Python becoming less Lisp-like

Peter Maas peter at somewhere.com
Thu Mar 17 04:08:44 EST 2005


Kay Schluehr schrieb:
> Some people refused properties in Python for exactly this reason.
> Defining somewhat like:
> 
> def _get_X(self):
>     return self._X
> 
> def _set_X(self,X):
>     self._X = X
> 
> X = property(_get_X, _set_X )
> 
> in a Java-style fashion is indeed awfull and clumsy and that people
> dismiss such boilerplate code is understandable.

This is original Delphi-Style, btw. But why is this boilerplate code?
You define a property, and tell how it is read and written. How does
your preferred code look like?

-- 
-------------------------------------------------------------------
Peter Maas,  M+R Infosysteme,  D-52070 Aachen,  Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------



More information about the Python-list mailing list