Application and package of the same name
David Stanek
dstanek at dstanek.com
Sat Oct 21 09:08:02 EDT 2017
On 19-Oct 19:34, Paul Moore wrote:
> On 19 October 2017 at 19:18, Skip Montanaro <skip.montanaro at gmail.com> wrote:
> >
> > This is in Python 2.7, FWIW. What am I missing?
>
> My immediate reaction is "you shouldn't name your main program and
> your package the same". It's not a pattern I've seen commonly used.
>
This is actually a common pattern I see when teaching the language. For
example, when a student wants to test out a package like requests many
seem to initially want to create a requests.py module. Then they become
very confused when they get an AttributeError on requests.get().
--
david stanek
web: https://dstanek.com
twitter: https://twitter.com/dstanek
More information about the Python-list
mailing list