On Sat, 16 Aug 2003, Sean O'Rourke wrote: > Michal Wallace <[EMAIL PROTECTED]> writes: > > I expected getprop to behave like find_lex > > and throw an exception if the property doesn't > > exist, but it doesn't: > > Are you sure that properties are what you want to use > here, rather than attributes (via get_pmc_keyed() or > similar)? IIRC parrot's properties are supposed to > support out-of-band data like Lisp's plists or Perl 6 > properties > (http://dev.perl.org/perl6/apocalypse/2#properties)
Yes, I think so. I asked about this earlier in a thread called "in vs on". Python objects have both __getitem__ (for x[y]) and __getattr__ (for x.y) Dan agreed that for python, using get_pmc_keyed and getprop (respecitvely) was the way to go. Granted, python *classes* wouldn't normally allow __getitem__, but since you can pass them around like any other object, I want to treat classes and objects the same way and handle their differences in the vtable. Sincerely, Michal J Wallace Sabren Enterprises, Inc. ------------------------------------- contact: [EMAIL PROTECTED] hosting: http://www.cornerhost.com/ my site: http://www.withoutane.com/ --------------------------------------