New submission from Keith Prussing:

When a module is run under pdb in Python 3, __package__ is set to the empty 
string instead of None.  The attached minimum working example depicts this 
behavior.  The results are summarized in the following table.

=============== ====== ======
    Command      Py 2   Py 3
=============== ====== ======
 python          None   None
 python -m        ''     ''
 python -m pdb   None    ''
 pdb             None    ''
=============== ====== ======

The behavior I expected was for the Python executable to treat the input file 
as a script and not a module.  My rationale is that pdb is loaded as the 
executing module that accepts a script as its argument.  Per the help, only one 
-m option is allowed when launching python.

----------
components: Extension Modules
files: mwe.py
messages: 254989
nosy: Keith Prussing
priority: normal
severity: normal
status: open
title: __package__ not set to None under pdb in Python 3
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file41099/mwe.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25682>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to