[Zope] get non-acquired attributes of an instance

thomas desvenain thomas.desvenain at gmail.com
Mon Jun 26 07:37:46 EDT 2006


2006/6/26, Andreas Jung <lists at zopyx.com>:
>
>
> --On 26. Juni 2006 10:53:39 +0200 thomas desvenain
> <thomas.desvenain at gmail.com> wrote:
>
> > aq_base(aq_inner(obj)).__dict__ ?
> >
> > hmm it doesn't works, i get metadata only,
>
> 'metadata'? This is an unkown term in the context of Zope/Python objects
> except for catalog brain objects...what you you mean?

sorry, it's because i work with at/plone objects :

toto.__dict__ displays only some identifiers, metadata and 'content'
of toto object

{'_EtagSupport__etag': 'ts51320374.17',
 '_at_uid': 'ffa61909947ef9021cab5bcbccfb5f54',
 '_md': {'excludeFromNav': None, 'description': '', 'contributors':
(), 'rights': '', 'language': '', 'effectiveDate': None,
'expirationDate': None, 'allowDiscussion': None, 'creators':
(u'admin',), 'subject': ()},
 '_objects': ({'id': 'connection',
               'meta_type': 'Z Psycopg Database Connection'},),
 'at_references': <Folder at at_references>,
 'connection': <Connection at connection>,
 'creation_date': DateTime('2006/06/26 13:10:40.161 GMT+2'),
 'demarshall_hook': None,
 'id': 'toto',
 'marshall_hook': None,
 'modification_date': DateTime('2006/06/26 13:12:54.164 GMT+2'),
 'title': ''}

and so does aq_base(aq_inner(toto)).__dict__

>
> >
> > and with
> >
> > dir(aq_base(aq_inner(test.toto)))
> >
> > i get acquired methods too...
>
> Of course yes...that's standard Python behavior.
>
> -aj
>
>


-- 
Thomas Desvenain
Junior Plone/Zope analyst-developer, Looking for a Job !
Now, trainee at Institut National de Recherche Agronomique
Mathématiques, Informatique et Génôme laboratory
78350 Jouy en Josas
+33 (0)1 34 65 29 43


More information about the Zope mailing list