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


Groups > comp.lang.python > #80783

Re: Two locations for module struct ?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!zen.net.uk!dedekind.zen.co.uk!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'read.': 0.03; 'api.': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sub': 0.09; 'subject:module': 0.09; 'val': 0.09; 'jan': 0.12; 'ast': 0.16; 'imports': 0.16; 'leakage': 0.16; 'modules,': 0.16; 'modules.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:Two': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'module': 0.19; 'written': 0.21; 'import': 0.22; 'header:User-Agent:1': 0.23; 'documented': 0.24; 'stick': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'included': 0.31; 'struct': 0.31; 'but': 0.35; 'there': 0.35; 'accessible': 0.36; 'module.': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'such': 0.63; 'more': 0.64; 'wave': 0.74; '10:11': 0.84; 'received:fios.verizon.net': 0.84; 'struct.': 0.84; 'received:108': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Two locations for module struct ?
Date Fri, 14 Nov 2014 16:47:13 -0500
References <54661ba8$0$2906$426a74cc@news.free.fr>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-108-16-203-145.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <54661ba8$0$2906$426a74cc@news.free.fr>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15830.1416001658.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416001658 news.xs4all.nl 2935 [2001:888:2000:d::a6]:60797
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:80783

Show key headers only | 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