Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Add __exports__ to modules

Tim Peterstim.one@home.com
Mon, 8 Jan 2001 03:17:59 -0500


[Greg Stein]> Simple question: so what?>> "Oh, no! My module exposes mod.sys! Oh, woe is me!"  *snort*Couldn't care less about the module author.  It's the module user who has tosort this stuff out.  "Don't use 'import *'" is good advice but not followedeither, and after I dofrom MyPackage import sys  # intentionally exports its own sysfrom GregSnort import *    # accidentally exports some other sysmadness ensues.  Like I said, it's inelegant, and at best.Simple question for you:  what would __exports__ hurt?  "Oh, no!  Tim'smodule explicitly lists what it intended to export!  Oh, woe is me!".  Gimmea break.


[8]ページ先頭

©2009-2025 Movatter.jp