[CM] what would be like Python dictionaries?

Rick Taube taube at uiuc.edu
Tue Apr 6 06:39:22 PDT 2004


property lists, association lists or hash tables are all reasonable 
choices for implementing dictionaries. if you have just a few 
definitions then plists are probably the easiest way to go. plists can 
be associated with particular symbols using 'get' and '(setf get)' or 
you can treat any list as a plist if you use 'getf'. however, testing 
for the existence of a property in a property list is a bit tricky 
because both 'get' and 'getf' return false in the case of a nil 
property value OR in the case where the property itself is undefined in 
the plist. but you can use 'member' to see if a property name appears 
in the list or not.

> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist




More information about the Cmdist mailing list