Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80783

Re: Two locations for module struct ?

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Two locations for module struct ?
Date 2014-11-14 16:47 -0500
References <54661ba8$0$2906$426a74cc@news.free.fr>
Newsgroups comp.lang.python
Message-ID <mailman.15830.1416001658.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 11/14/2014 10:11 AM, ast wrote:
> Hello
>
> In module wave there is a sub module struct.

struct is not a documented part of the wave module.

> You can call function pack() with:
>
> import wave
> val = wave.struct.pack(...)

wave imports several other stdlib modules. All are accessible the same 
way.  None are documented or included in wave.__all__.  Some modules, 
typically more recently written or edited, do things like

import struct as _struct

to avoid such leakage of import.  But this is a nuisance to write and 
read.  Best to stick with the documented api.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


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