[issue8824] Improve documentation of exec

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I decided that the alternate addition in #13557 is enough.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

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



[issue8824] Improve documentation of exec

2012-11-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Should this be closed as a duplicate of issue #13557?

--

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



[issue8824] Improve documentation of exec

2012-11-25 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - duplicate
status: open - closed
superseder:  - exec of list comprehension fails on NameError

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



[issue8824] Improve documentation of exec

2012-11-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I suggested more change here than I committed in #13557. I would like to think 
about the extra a bit more. The issue about def in exec just came up again on 
python-list, but I do not really like the third sentence I suggested.

--
assignee: docs@python - terry.reedy

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



[issue8824] Improve documentation of exec

2012-11-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Okay;  sorry about that.  Reopening.

--
resolution: duplicate - 
status: closed - open

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



[issue8824] Improve documentation of exec

2012-11-08 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +mark.dickinson
type:  - enhancement
versions: +Python 3.4 -Python 3.1

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



[issue8824] Improve documentation of exec

2011-05-12 Thread Jordan Stadler

Changes by Jordan Stadler jordan.stad...@gmail.com:


Removed file: http://bugs.python.org/file21961/exec_doc_touchup_3_x.patch

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



[issue8824] Improve documentation of exec

2011-05-12 Thread Jordan Stadler

Changes by Jordan Stadler jordan.stad...@gmail.com:


Added file: http://bugs.python.org/file21981/exec_doc_touchup_3.x.patch

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



[issue8824] Improve documentation of exec

2011-05-12 Thread Jordan Stadler

Changes by Jordan Stadler jordan.stad...@gmail.com:


Added file: http://bugs.python.org/file21982/exec_doc_touchup_2.x.patch

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



[issue8824] Improve documentation of exec

2011-05-12 Thread Jordan Stadler

Jordan Stadler jordan.stad...@gmail.com added the comment:

I've updated the 3.x patch, should be correct now.

I also updated the 2.x patch to use ``in``. :keyword:`in` was used in an 
earlier part of the paragraph I modified, so I have changed both for 
consistency.

This is the paragraph before modification:

  In all cases, if the optional parts are omitted, the code is executed in the
  current scope.  If only the first expression after :keyword:`in` is specified,
  it should be a dictionary, which will be used for both the global and the 
local
  variables.  If two expressions are given, they are used for the global and 
local
  variables, respectively. If provided, *locals* can be any mapping object.


--

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



[issue8824] Improve documentation of exec

2011-05-12 Thread Jordan Stadler

Changes by Jordan Stadler jordan.stad...@gmail.com:


Removed file: http://bugs.python.org/file21960/exec_doc_touchup_2_x.patch

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



[issue8824] Improve documentation of exec

2011-05-11 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

In 3.x exec is a function, so the reference to 'in' should be removed/updated.  
On 2.x it might be better to just use ``in`` instead of :keyword:`in`, because 
the latter probably links to the 'in' operator that checks for containment.

--
nosy: +ezio.melotti
stage:  - patch review
versions: +Python 3.3 -Python 2.6

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



[issue8824] Improve documentation of exec

2011-05-10 Thread Jordan Stadler

Jordan Stadler jordan.stad...@gmail.com added the comment:

I'm going to update the documentation to include the scope information. Should 
be done within a day.

--
nosy: +jstadler

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



[issue8824] Improve documentation of exec

2011-05-10 Thread Jordan Stadler

Changes by Jordan Stadler jordan.stad...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file21960/exec_doc_touchup_2_x.patch

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



[issue8824] Improve documentation of exec

2011-05-10 Thread Jordan Stadler

Changes by Jordan Stadler jordan.stad...@gmail.com:


Added file: http://bugs.python.org/file21961/exec_doc_touchup_3_x.patch

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



[issue8824] Improve documentation of exec

2011-05-10 Thread Jordan Stadler

Jordan Stadler jordan.stad...@gmail.com added the comment:

Patches for 2.x and 3.x documentation related to 'exec'.

2.x
  Provides more information about scopes when using additional expressions
  for 'exec'. 2.x documentation for 'exec' is found in
  reference/simple_stmts.
3.x
  Provides more information about scopes when using additional expressions
  for 'exec'.  3.x documentation for 'exec' is found in library/functions.

--

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



[issue8824] Improve documentation of exec

2011-05-10 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +r.david.murray

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



[issue8824] Improve documentation of exec

2010-05-26 Thread Terry J. Reedy

New submission from Terry J. Reedy tjre...@udel.edu:

This doc improvement suggestion is inspired by #991196 (and subsequent 
duplicates) and the current discussion on py-dev in the thread
  'variable name resolution in exec is incorrect'
(which is not a correct claim). I believe there is consensus that the doc for 
exec needs improving.

My suggestion (which others may amend) is that the following paragraph (from 
the 3.x builtin functions exec entry)

In all cases, if the optional parts are omitted, the code is executed in the 
current scope. If only globals is provided, it must be a dictionary, which will 
be used for both the global and the local variables. If globals  and locals are 
given, they are used for the global and local variables, respectively. If 
provided, locals can be any mapping object.

have these two sentences added:

If only globals is provided or if onedict is provided as both globals and 
locals, the code is executed in a new top-level scope. If different objects are 
given as globals and locals, the code is executed as if it were in a class 
statement in a new top-level scope.

--
assignee: d...@python
components: Documentation
messages: 106552
nosy: d...@python, tjreedy
priority: normal
severity: normal
status: open
title: Improve documentation of exec
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue8824] Improve documentation of exec

2010-05-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

To be super-clear, consider adding one more sentence, something like

The result for code with def statements or lambda expressions may be different 
than it would be if the implied context were a function rather than a class.

--

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



[issue8824] Improve documentation of exec

2010-05-26 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
nosy: +ncoghlan

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