Re: Design decision
by Paul Prescod other posts by this author
Nov 21 2001 8:06PM messages near this date
view in the new Beta List Site
Re: Design decision
|
Re: ActiveState's Python implementation of the WebService API
Paul Kulchenko wrote:
>
> Hi, Paul!
>
> FWIW it looks good to me. We didn't discussed API for updates, did
> we? Any plans? Should we use the same method: ->Port("name") to get
> value and ->Port("name", $new_value) to update/assign a new value?
Good question. My idea is that the "Ports" list would be mutable. And it
would be usable both like a list and a mapping. Here's an API that Gisle
and I just discussed:
Positions are all zero-based.
integer propety length
getItem(string Name) # return None if not there
getItem(integer position) # use language semantics of throwing exception
or return special value
insertItem(Node, [position])
# if a node with the same name is already there, replace it at the
same position
# elseif position is missing do an append
# elseif position = length, append node
# elseif position < length do an insertion in front of the element
with the given position
# else die
deleteItem(string Name) # use language semantics to throw exception or
ignore bad names
deleteItem(integer position) # ditto
Paul Prescod
_______________________________________________
Ws-dev mailing list
Ws-dev@[...].com
http://listserv.ActiveState.com/mailman/listinfo/ws-dev
Thread:
Paul Prescod
Cameron Laird
Paul Prescod
Chris Radcliff
Rich Salz
Paul Prescod
Paul Kulchenko
Paul Prescod
Paul Prescod
|