|
From: Samuele P. <pe...@in...> - 2000-12-21 14:31:13
|
Hi.
[Finn]
> Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
> Type "copyright", "credits" or "license" for more information.
> >>> import pack1
> >>> print pack1.Node, type(pack1.Node)
> pack1.Node <type 'class'>
> >>> from pack1.Node import Node
> >>> print pack1.Node, type(pack1.Node)
> <module 'pack1.Node' from 'pack1\Node.pyc'> <type 'module'>
>
>
> Jython 2.0alpha2 on java1.3.0 (JIT: null)
> >>> import pack1
> >>> print pack1.Node, type(pack1.Node)
> pack1.Node org.python.core.PyClass
> >>> from pack1.Node import Node
> >>> print pack1.Node, type(pack1.Node)
> pack1.Node org.python.core.PyClass
> >>>
The issue is clear to me, the cause of this is the following piece of
code that I left around as it was:
if (ret != null) {
// Allow a package component to change its own meaning
PyObject tmp = __dict__.__finditem__(attr);
if (tmp != null)
ret = tmp;
__dict__.__setitem__(attr, ret);
return ret;
}
Is that really necessary, I should study a little better CPython semantics.
Then I will post a fixed fix <wink>.
regards, Samuele.
|