[Python-Dev] PEP 318: Properties (original) (raw)
Guido van Rossum guido at python.org
Sat Apr 3 16:50:45 EST 2004
- Previous message: [Python-Dev] PEP 318: Properties
- Next message: [Python-Dev] PEP 318: Properties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
How would this be interpreted?
x = 42 def x(self) [propget]: "Doc string for x" _return self.x def x(self, newx) [propset]: _self.x = newx def x(self) [propdel]: _del self.x That is, there is already an (otherwise invalid) 'x' in the calling scope when propget() is called. Do the property doodads just need to be bulletproofed or should an exception be raised?
It's broken. I expect this to raise an exception at some point. Beyond that, who cares?
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] PEP 318: Properties
- Next message: [Python-Dev] PEP 318: Properties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]