Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'sub': 0.09; 'subject:module': 0.09; 'val': 0.09; 'cc:addr:python-list': 0.11; 'ast': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'imported.': 0.16; 'subject:Two': 0.16; 'sat,': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'module': 0.19; 'import': 0.22; 'putting': 0.22; 'cc:addr:python.org': 0.22; 'module,': 0.24; 'cc:2**0': 0.24; '15,': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'struct': 0.31; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'two': 0.37; 'nov': 0.38; 'called': 0.40; 'places': 0.64; 'wave': 0.74; 'presumably': 0.84; 'struct.': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=/NdrheS3A27zGwOLL46gPioQgC/NMRDPVYgDCJEpXro=; b=G4Xn/zAbrew/X0qsKugqW1nzEI4X70VoJ6zu1L/kFc3EX4DgSfbXKC/iFAwYE7owId 6LiwcXCrF/xL6B9dy46P825P8HKpPV6NWrBxwDN+lttmhTMypCThvPToVy/VXM5hBwTN 4znfriBo1GfxmWHjHItz6XlNPP7MVN694czbC5ZjZafkARb5/EOTHFSTDMTWU4iIihjY JPQwxB/79u8f0ErhIh5j10d+3PpvoSkuKq3pe15Dv/6Olt9zk+Cg/un5its8snXhtzwY kqPZVteKakfBaUoVNBD+YM8ZAvdGEUXvXeQBtjKxmbUkyK4Pwv5xuj9oCMTaN2fTGWUj Ybkg== MIME-Version: 1.0 X-Received: by 10.42.110.195 with SMTP id r3mr12091280icp.12.1415982296229; Fri, 14 Nov 2014 08:24:56 -0800 (PST) In-Reply-To: <54661ba8$0$2906$426a74cc@news.free.fr> References: <54661ba8$0$2906$426a74cc@news.free.fr> Date: Sat, 15 Nov 2014 03:24:56 +1100 Subject: Re: Two locations for module struct ? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1415982664 news.xs4all.nl 2942 [2001:888:2000:d::a6]:33477 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80771 On Sat, Nov 15, 2014 at 2:11 AM, ast 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