yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12209
Re: [Branch ~yade-pkg/yade/git-trunk] Rev 3705: Addition in doc of Omega.engines to state it is = to O.engines in python
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Bruno Chareyre <bruno.chareyre@xxxxxxxxxxxxxxx>
-
Date:
Thu, 23 Jul 2015 17:52:29 +0200
-
In-reply-to:
<CAAkvNuWoYh-JEzyypE6yKrYfsjvr6c-QW0sAJzhte08j=_hXdA@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
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.chareyre@xxxxxxxxxxxxxxx <mailto:bruno.chareyre@xxxxxxxxxxxxxxx>>:
>
>
> > 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@xxxxxxxxxxxxxxxxxxx
> <mailto:yade-dev@xxxxxxxxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxxxxxxx
> 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
________________
References