[Edu-sig] quantum instance

Kirby Urner urnerk at qwest.net
Sun Sep 18 01:41:14 CEST 2005


 
> The version of Python I run - Python 2.4 (#60, Nov 30 2004, 11:49:19) -
> discourages me from writing extra code for the purpose of revealing less.
> It comes with no "properties" exception of which I am aware.

<<...>>

> 
> Art

Hey Art, this is making very little sense to me.  All versions of 2.4 should
give you 'property' syntax.  Just write:

 >>> class Foo:

       def __get_duh(self):
           return "Well, yeah, Duh!"

       duh = property(__get_duh)

 >>> obj = Foo()
 >>> obj.duh
 'Well, yeah, Duh!'


That's all in my Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit
(Intel)] on win32.

Let's not continue until we figure out why this isn't working for you.

Kirby




More information about the Edu-sig mailing list