Re: _PACKAGE in a nested module
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: _PACKAGE in a nested module
- From: Tomas <tomas@...>
- Date: 2006年1月17日 13:15:11 -0200 (BRST)
If you create a module, call it peanut, with a nested module, say butter.
And then print(peanut.butter._PACKAGE) the answer you get is "peanut." with
the trailing period.
I would expect the answer to just be "peanut".
Similarly, if you define a module, peanut.butter.sandwich, and then
print(peanut.butter.sandwich._PACKAGE) you get "peanut.butter.".
Is that the intended behavior?
This is the correct behaviour. I think you need ._NAME.
Have you tried it?
Tomas