Can you add refs to all the PEPs? Will this go into 2.6 also? If so, you should send to python-dev too. If this is accepted, can you update the 2.6 PEP 361.
On 4/22/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > > Implementation > ============== > > When the ``-m`` option is used, ``sys.main`` will be set to the > argument passed in. ``sys.argv`` will be adjusted as it is currently. > Then the equivalent of ``__import__(self.main)`` will occur. This > differs from current semantics as the ``runpy`` module fetches the > code object for the file specified by the module name in order to > explicitly set ``__name__`` and other attributes. This is no longer > needed as import can perform its normal operation in this situation. > > If a file name is specified, then ``sys.main`` will be set to > ``"__main__"``. The specified file will then be read and have a code > object created and then be executed with ``__name__`` set to > ``"__main__"``. This mirrors current semantics. What happens when no file is passed in (ie, interactive) or when -c is used? Will sys.main be set? If so, to what? n _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
