Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Re: different instances with different data descriptors with the same name
Gabriel Genellina
2/18/2008 6:54:00 PM
En Mon, 18 Feb 2008 08:21:11 -0200, Fabrizio Pollastri
<f.pollastri@inrim.it> escribi�:
> Data descriptors are set as attributes of object types. So if one has
> many
> instances of the same class and wants each instance to have a different
> property
> (data descriptor) that can be accessed with a unique attribute name, it
> seems to
> me that there is no solution with data descriptors. There is any
> workaround to
> this? Thank in advance for any help.
Use __getattr__ or change dynamically each instance's class. See this
recent thread:
http://groups.google.com/group/comp.lang.python/browse_frm/thread/bfc093...
--
Gabriel Genellina
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: different instances with different data descriptors with the same name
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password