Author eric.snow
Recipients Arfrever, brett.cannon, eric.snow, ncoghlan
Date 2014-01-04.07:09:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1388819350.98.0.335021608272.issue19697@psf.upfronthosting.co.za>
In-reply-to
Content
Here's an outline of how I see __main__.__spec__ playing out relative to the various cmdline interfaces.

== == == === ==== ======== ======== ======== ======== ============
-  -c -m dir file name     loader   origin   cached   has_location
== == == === ==== ======== ======== ======== ======== ============
                  __main__ builtin  -        None     False
X                 __main__ builtin  -        None     False
   X              __main__ builtin  -c       None     False
      X           (finder) (finder) (finder) (finder) (finder)
         X        __main__ <loader> path     None     True
             X    __main__ <loader> path     None     True
== == == === ==== ======== ======== ======== ======== ============

Note: __main__.__spec__ in the -m case is addressed in issue #19700.

Thoughts?

See:

[1] http://docs.python.org/3.4/using/cmdline.html
[2] Python/pythonrun.c
[3] Modules/main.c
History
Date User Action Args
2014-01-04 07:09:11eric.snowsetrecipients: + eric.snow, brett.cannon, ncoghlan, Arfrever
2014-01-04 07:09:10eric.snowsetmessageid: <1388819350.98.0.335021608272.issue19697@psf.upfronthosting.co.za>
2014-01-04 07:09:10eric.snowlinkissue19697 messages
2014-01-04 07:09:10eric.snowcreate