Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80771
| References | <54661ba8$0$2906$426a74cc@news.free.fr> |
|---|---|
| Date | 2014-11-15 03:24 +1100 |
| Subject | Re: Two locations for module struct ? |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15822.1415982664.18130.python-list@python.org> (permalink) |
On Sat, Nov 15, 2014 at 2:11 AM, ast <nomail@invalid.com> wrote: > In module wave there is a sub module struct. > You can call function pack() with: > > import wave > val = wave.struct.pack(...) > > but the same function can be called with: > > import struct > val = struct.pack(...) > > Is it exactly the same module in both location ? > Why putting struct in two places ? I don't think that's a submodule of wave. It's just the standard struct module, which presumably wave imported. Use it as struct, not as wave.struct. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Two locations for module struct ? "ast" <nomail@invalid.com> - 2014-11-14 16:11 +0100
Re: Two locations for module struct ? Chris Angelico <rosuav@gmail.com> - 2014-11-15 03:24 +1100
Re: Two locations for module struct ? Peter Otten <__peter__@web.de> - 2014-11-14 17:51 +0100
Re: Two locations for module struct ? "ast" <nomail@invalid.com> - 2014-11-14 19:12 +0100
Re: Two locations for module struct ? Terry Reedy <tjreedy@udel.edu> - 2014-11-14 16:47 -0500
csiph-web