On 23/07/15 15:04, Jan Stránský wrote: > @Bruno: O is defined a a global variable but it is just a convention. > If you continued: > > bla = Omega() > bla is O # False > bla == O # False > bla.engines == O.engines # True :-) > # probably some consequence of defining Omega as singleton in C++ (the > C++ object is the same but Python object wrapping it not) > ... > O = Vector3(0,0,0) # origin of coordinate system # to have desired > nonsense, you have to overwrite O name > ... > O.engines = [...] # O.engines? stil works :-D :-D > > now you are getting to troubles :-) Yes, exactly what I suggested in the previous email. :) I wanted to show a general logic but this is a particular case in which everything is more complex. Still, I could probably overload the constructor of pyOmega to make it really create an independent scene. Then the inconsistency would hold maybe. This is way beyond the simple fact that O.something doesn't need to mention "O." in its docstring. :)
B > Jan > > > 2015-07-23 14:50 GMT+02:00 Bruno Chareyre > <bruno.chare...@3sr-grenoble.fr <mailto:bruno.chare...@3sr-grenoble.fr>>: > > > > bla=Omega() > > bla.engines? > > Docstring: [...] accessed using O.engines > > > > Do you see the problem? Do I really access the engines of "bla" as > > "O.engines"? > For some reason the answer is actually "yes", haha. > But I guess you will get the general idea. > B > > > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-dev > <https://launchpad.net/%7Eyade-dev> > Post to : yade-dev@lists.launchpad.net > <mailto:yade-dev@lists.launchpad.net> > Unsubscribe : https://launchpad.net/~yade-dev > <https://launchpad.net/%7Eyade-dev> > More help : https://help.launchpad.net/ListHelp > > > > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-dev > Post to : yade-dev@lists.launchpad.net > Unsubscribe : https://launchpad.net/~yade-dev > More help : https://help.launchpad.net/ListHelp -- _______________ Bruno Chareyre Associate Professor ENSE³ - Grenoble INP Lab. 3SR BP 53 38041 Grenoble cedex 9 Tél : +33 4 56 52 86 21 Fax : +33 4 76 82 70 43 ________________
_______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp