ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ws-dev
ws-dev
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved