Relative Imports, why the hell is it so hard?
gagsl-py2 at yahoo.com.ar
Tue Mar 24 20:26:19 CET 2009
En Tue, 24 Mar 2009 09:01:01 -0300, R. David Murray
<rdmurray at bitdance.com> escribió:
> CinnamonDonkey <CinnamonDonkey at googlemail.com> wrote:
>> On 23 Mar, 18:57, bearophileH... at lycos.com wrote:
>> > CinnamonDonkey:
>> > >what makes something a package?
>> > If you don't know what a package is, then maybe you don't need
>> > packages.
>> Thanx for taking the time to post a response but I am afraid I feel
>> the need to point out that it is exactly this kind of response that I
>> find un-helpful. It is neither constructive nor educational.
> I think bearophile could have left out the first sentence, but otherwise
> his question is perfectly sensible. If you have a bunch of independent
> modules, then you don't need to put them in packages. Your example
> only showed one module file in each package...I understand now that was
> just for simplicity of the example, but we had no way of knowing that.
Especially, since people coming from Java:
- think that they *have* to use a package
- think that they *have* to put a single class per file
Neither is true in Python. And from the example alone, one could infer the
OP was making such mistakes. Glad to see it was not the case.
More information about the Python-list