[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-25 Thread Mark Dickinson

Changes by Mark Dickinson :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fd9c9579050d by Mark Dickinson in branch '2.7':
Issue #16339: Document and test exec(stmt, globals, locals) form in Python 2.7.
http://hg.python.org/cpython/rev/fd9c9579050d

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Rewording the sentence about Python 3.

--
Added file: http://bugs.python.org/file28109/issue16339_v3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Updated patch:  drops mention of backwards compatibility, since that's not so 
useful (thanks, Ezio!).  Adds note about resemblance to Python 3 code.

--
Added file: http://bugs.python.org/file28108/issue16339_v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-25 Thread Mark Dickinson

Changes by Mark Dickinson :


--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-25 Thread Mark Dickinson

Changes by Mark Dickinson :


Removed file: http://bugs.python.org/file28105/issue16339.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-25 Thread Mark Dickinson

Changes by Mark Dickinson :


Added file: http://bugs.python.org/file28106/issue16339.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a patch for the documentation and tests.

--
keywords: +patch
Added file: http://bugs.python.org/file28105/issue16339.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-13 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee: docs@python -> mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-05 Thread Mark Dickinson

Mark Dickinson added the comment:

Thread on #python-dev:  
http://mail.python.org/pipermail/python-dev/2012-November/122543.html

If this is documented, direct tests for this form of exec should also be added.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-11-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2?

2012-10-27 Thread Mark Dickinson

New submission from Mark Dickinson:

In Python 2, the 'exec' statement supports 'exec'-ing a (statement, globals, 
locals) tuple:

>>> exec("print 2", {}, {})
2

This doesn't seem to be documented at 
http://docs.python.org/reference/simple_stmts.html#the-exec-statement.

If I understand correctly, the 'exec tuple' form was originally there for 
backwards compatibility with ancient versions of Python;  however, it now also 
conveniently provides the semblance of forwards compatibility with Python 3.  
It appears to be supported by current versions of Jython (though judging by 
issue 403345 that wasn't always the case) and PyPy.

Is this omission intentional?  Is this form of exec an official, supported part 
of the Python 2 language?

--
assignee: docs@python
components: Documentation
messages: 173947
nosy: docs@python, mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: Document "exec(stmt, global_dict, local_dict)" form in Python 2?
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com