[issue6163] [HP-UX] ld: Unrecognized argument: +s -L

2009-09-08 Thread Michael Haubenwallner

Michael Haubenwallner  added the comment:

> > compiler.find("gcc") >= 0 or compiler.find("g++") >= 0

> Why not `("gcc" in compiler or "g++" in compiler)`? Just curious.

Fine with me too.

--

___
Python tracker 

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



[issue6844] BaseException DeprecationError raises inappropriately

2009-09-08 Thread Brett Cannon

Brett Cannon  added the comment:

I had a feeling you were going to ask that. =) I think it's fine, and from 
what I can tell from PEP 384 it's okay as long as it is in no way publicly 
exposed. But I have added Martin to the nosy list to make sure I am not 
messing up the ABI somehow in a micro release.

--
assignee:  -> loewis
nosy: +loewis

___
Python tracker 

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



[issue6868] Check errno of epoll_ctrl

2009-09-08 Thread shaowei.cui

New submission from shaowei.cui :

in selectmodule.c, I found the code of epoll module
'result = epoll_ctl(epfd, op, fd, &ev);
if (errno == EBADF) {
/* fd already closed */
result = 0;
errno = 0;
}
'
'man epoll_ctl' show 'EBADF  epfd or fd is not a valid file
descriptor.', assume I register an fd of 'open('xxx', O_RDONLY)', return
value will be -1, errno will be EBADF,  
epoll not support 'file descriptors.' as i know,  or i register an fd
was not be opened.

--
components: Library (Lib)
messages: 92441
nosy: shaovie
severity: normal
status: open
title: Check errno of epoll_ctrl
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue6867] return value of epoll.register

2009-09-08 Thread shaowei.cui

New submission from shaowei.cui :

help(select.epoll) show 'register(fd[, eventmask]) -> bool', but it
return 'None' actually. 

I view the source code of selectmodule.c that return None actually.

The function "pyepoll_internal_ctl(int epfd, int op, PyObject *pfd,
unsigned int events)"

--
assignee: georg.brandl
components: Documentation
messages: 92440
nosy: georg.brandl, shaovie
severity: normal
status: open
title: return value of epoll.register
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue6844] BaseException DeprecationError raises inappropriately

2009-09-08 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

Can I add a field to the PyBaseExceptionObject struct?

--

___
Python tracker 

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



[issue6836] Mismatching use of memory APIs

2009-09-08 Thread Tim Peters

Tim Peters  added the comment:

Right, I /was/ hallucinating about serialno -- good catch.

Mysterious little integers still suck, though ;-)  If you're going to
store it in a byte, then you can #define semi-meaningful letter codes
instead; e.g.,

#define _PYMALLOC_OBJECT_ID 'o'
#define _PYMALLOC_MEM_ID 'm'

The place where those are defined would be a good place to document what
the heck they mean too.

--

___
Python tracker 

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



[issue6865] Refcount error in pwd module

2009-09-08 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r74727.

--
nosy: +benjamin.peterson
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



[issue6822] Error calling .storlines from ftplib

2009-09-08 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file14866/ftplib.patch

___
Python tracker 

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



[issue6822] Error calling .storlines from ftplib

2009-09-08 Thread STINNER Victor

STINNER Victor  added the comment:

@amaury.forgeotdarc: Oops, no, it doesn't.

The new patch includes a new test (for the unicode file).

--
Added file: http://bugs.python.org/file14867/ftplib-2.patch

___
Python tracker 

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



[issue6822] Error calling .storlines from ftplib

2009-09-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Does this still pass the test suite? in test_ftplib, storlines() is given 
a BytesIO object.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue6822] Error calling .storlines from ftplib

2009-09-08 Thread STINNER Victor

STINNER Victor  added the comment:

Oh yes, FTP.storlines() fails if the file is a text file. Here is a
patch. My patch encodes each line with self.encoding, which is latin1 by
default.

--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file14866/ftplib.patch

___
Python tracker 

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



[issue6866] TestLoader.loadTestsFromName does not use suiteClass attribute to create TestSuite instances

2009-09-08 Thread Mark Roddy

Mark Roddy  added the comment:

The issue appears to be in the other versions mentioned from manual 
inspection.

Also adding another patch as unittest in the trunk has been broken 
apart into a package with several modules so the original patch will 
not work there.

--
Added file: http://bugs.python.org/file14865/unittest.trunk.patch

___
Python tracker 

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



[issue6857] float().__format__() default alignment

2009-09-08 Thread Mark Dickinson

Mark Dickinson  added the comment:

I've changed the default alignment for Decimal instances to right-aligned 
(so that it agrees with floats and ints) in r74723 (trunk), r74725 (py3k),
as agreed in the python-dev thread starting at:
http://mail.python.org/pipermail/python-dev/2009-September/091640.html

--

___
Python tracker 

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



[issue6857] float().__format__() default alignment

2009-09-08 Thread Eric Smith

Eric Smith  added the comment:

Thanks for the decimal work, Mark. I notice that complex is also left
aligned, by default. I'll take a look at that.

--

___
Python tracker 

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



[issue6866] TestLoader.loadTestsFromName does not use suiteClass attribute to create TestSuite instances

2009-09-08 Thread R. David Murray

R. David Murray  added the comment:

I haven't run the tests, but a quick glance at the code makes me think
this is still probably an issue in 2.7/3.1.

--
assignee:  -> michael.foord
nosy: +michael.foord, r.david.murray
priority:  -> normal
stage:  -> patch review
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0

___
Python tracker 

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



[issue6163] [HP-UX] ld: Unrecognized argument: +s -L

2009-09-08 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

> compiler.find("gcc") >= 0 or compiler.find("g++") >= 0

Why not `("gcc" in compiler or "g++" in compiler)`? Just curious.

--

___
Python tracker 

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



[issue6071] no longer possible to hash arrays

2009-09-08 Thread Georg Brandl

Georg Brandl  added the comment:

Can't hurt :)

--
nosy: +georg.brandl
priority: high -> release blocker

___
Python tracker 

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



[issue6866] TestLoader.loadTestsFromName does not use suiteClass attribute to create TestSuite instances

2009-09-08 Thread Mark Roddy

New submission from Mark Roddy :

The TestLoader class in unittest.py has an attribute 'suiteClass' that 
is used to create instances of TestSuite object(s) in the process of 
loading tests.  If it is desired to subclass the TestSuite class then 
consumers may set this attribute on a TestLoader object in order to 
override what TestSuite class gets instantiated (a pythonic version of 
the factory method pattern).  

However, the loadTestsFromName() on the TestLoader class does not use 
this attribute to create TestSuite instances, and instead has a hard 
coded reference to the unittest.TestSuite class.  This results in the 
base class being created instead of a possibly desired subclass that 
has been specified via this attribute.  

Solution for this issue is to change the loadTestsFromName() method to 
use the suiteClass attribute when creating TestSuite objects instead 
using a reference to the TestSuite class.  Included is a patch that 
implements this behavior as well as two additional test for the 
test_unittest.py file which expose this issue if run against an 
unpatched version of unittest.

--
components: Library (Lib)
files: unittest.patch
keywords: patch
messages: 92427
nosy: MarkRoddy
severity: normal
status: open
title: TestLoader.loadTestsFromName does not use suiteClass attribute to create 
TestSuite instances
type: behavior
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file14864/unittest.patch

___
Python tracker 

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



[issue6795] decimal.py: minor issues && usability

2009-09-08 Thread Mark Dickinson

Mark Dickinson  added the comment:

Fixed in r74719 (release26-maint), r74720 (release31-maint).

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue6865] Refcount error in pwd module

2009-09-08 Thread caglar10ur

New submission from caglar10ur :

Fix refcounting problem which causes a segfault for following test code;


#include 

int main(void)
{
int i;
for (i = 0; i < 1000; ++i)
{
Py_Initialize();
PyRun_SimpleString("import pwd\n");
Py_Finalize();
}
return 0;
}


Reported-by: Onur Küçük 
Signed-off-by: S.Çağlar Onur 

--
files: pwdmodule_refcount_fix.patch
keywords: patch
messages: 92425
nosy: caglar10ur
severity: normal
status: open
title: Refcount error in pwd module
type: crash
versions: Python 2.5
Added file: http://bugs.python.org/file14863/pwdmodule_refcount_fix.patch

___
Python tracker 

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



[issue6823] time.strftime does unnecessary range check

2009-09-08 Thread Brett Cannon

Changes by Brett Cannon :


--
keywords: +patch

___
Python tracker 

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



[issue6239] c_char_p return value returns string, not bytes

2009-09-08 Thread STINNER Victor

STINNER Victor  added the comment:

> Commited as svn rev 74664 (py3k) and rev 74665 (release31-maint).

@theller: Cool, thanks ;-)

--

___
Python tracker 

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



[issue6863] Wrong linker command if CXX set to "ccache g++"

2009-09-08 Thread Pertti Kellomäki

Pertti Kellomäki  added the comment:

This patch seems to solve the problem for me. I think it should also
work with the environment variable setting on OS X, but I haven't tested it.

--
keywords: +patch
Added file: http://bugs.python.org/file14862/linker_command.patch

___
Python tracker 

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



[issue6071] no longer possible to hash arrays

2009-09-08 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

Can this ticket be marked as a release blocker so it's not forgotten
about for 2.7?

--

___
Python tracker 

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



[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-09-08 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I'm about to test the patches on a 10.4 system with Tk 8.4 and will report 
back with the results.

These patches might be useful to issue 6864, that issue says IDLE blocks 
on 10.6 and that problem seems to be fixed in python-trunk + Kevin's 
patches (although I haven't tested the trunk without these patches).

--

___
Python tracker 

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



[issue5621] Add description of special case to "Assignment statements" section

2009-09-08 Thread John Posner

John Posner  added the comment:

George, here is a patch file for this bug. It modifies file
doc/reference/simple_stmts.rst

Please let me know if this was the wrong way to submit the patch file.

--
keywords: +patch
status: pending -> open
Added file: http://bugs.python.org/file14861/assignment_statement.diff

___
Python tracker 

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



[issue1475692] replacing obj.__dict__ with a subclass of dict

2009-09-08 Thread R. David Murray

R. David Murray  added the comment:

2.5 and 2.4 are in security-fix-only mode, so we don't set them in
versions since bugs won't get fixed there.

I don't think overridden methods should be called, since that would slow
down attribute lookup, which is already a bottleneck in Python.  Whether
there should be an error message is a more complicated question, and I'd
have to look at how this is implemented to even have an opinion on that.

--
nosy: +r.david.murray
priority: normal -> low
versions: +Python 2.6, Python 3.2 -Python 2.4, Python 2.5

___
Python tracker 

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



[issue5397] PEP 372: OrderedDict

2009-09-08 Thread Matthieu Labbé

Changes by Matthieu Labbé :


--
nosy: +matthieu.labbe

___
Python tracker 

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



[issue1475692] replacing obj.__dict__ with a subclass of dict

2009-09-08 Thread Matthieu Labbé

Changes by Matthieu Labbé :


--
type: feature request -> behavior

___
Python tracker 

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



[issue1475692] replacing obj.__dict__ with a subclass of dict

2009-09-08 Thread Matthieu Labbé

Changes by Matthieu Labbé :


--
nosy: +matthieu.labbe
versions: +Python 2.4, Python 2.5

___
Python tracker 

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



[issue4485] fast swap of "default" Windows python versions

2009-09-08 Thread Matthieu Labbé

Changes by Matthieu Labbé :


--
nosy: +matthieu.labbe

___
Python tracker 

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



[issue6823] time.strftime does unnecessary range check

2009-09-08 Thread Richard Shapiro

Richard Shapiro  added the comment:

Here's a patch to normalize the results of the various system calls
which return time information. This was against the source for Python 2.5.1.

*** timemodule.cTue Sep  8 10:28:31 2009
--- /home/rshapiro/216/redist/Python-2.5.1/Modules/timemodule.c.distMon
Jan 12 22:53:07 2009
***
*** 241,247 
  static PyObject *
  tmtotuple(struct tm *p)
  {
- long dstval;
PyObject *v = PyStructSequence_New(&StructTimeType);
if (v == NULL)
return NULL;
--- 241,246 
***
*** 256,271 
SET(5, p->tm_sec);
SET(6, (p->tm_wday + 6) % 7); /* Want Monday == 0 */
SET(7, p->tm_yday + 1);/* Want January, 1 == 1 */
! /* Alas, on some platforms tm_isdst can be something other
than -1, 0, or 1 */
! if (p->tm_isdst < 0) {
!   dstval = -1;
! } else if (p->tm_isdst > 0) {
!   dstval = 1;
! } else {
!   dstval = 0;
! }
! 
!   SET(8, dstval);
  #undef SET
if (PyErr_Occurred()) {
Py_XDECREF(v);
--- 255,261 
SET(5, p->tm_sec);
SET(6, (p->tm_wday + 6) % 7); /* Want Monday == 0 */
SET(7, p->tm_yday + 1);/* Want January, 1 == 1 */
!   SET(8, p->tm_isdst);
  #undef SET
if (PyErr_Occurred()) {
Py_XDECREF(v);
(t)neo:/home/rshapiro/216/redist/patch/Python-2.5.1/Modules 140 %

--

___
Python tracker 

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



[issue6864] IDLE 2.6.1 locks up on Mac OS 10.6

2009-09-08 Thread dpogg1

dpogg1  added the comment:

I can confirm this is the same issue.

--

___
Python tracker 

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



[issue6864] IDLE 2.6.1 locks up on Mac OS 10.6

2009-09-08 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

If I understand you correctly the same also happens with the current 
version in subversion.

To reproduce:
* Start IDLE.app
* Open a new window

The new window opens, but (1) without a proper titlebar, and (2) this 
makes it impossible to further interact with IDLE (and that includes 
quiting the application).

--

___
Python tracker 

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



[issue6864] IDLE 2.6.1 locks up on Mac OS 10.6

2009-09-08 Thread dpogg1

New submission from dpogg1 :

IDLE 2.6.1 locks up on Mac OS 10.6 when running using Apple's built-in 
version of Python (also 2.6.1) when creating a new buffer window or 
attempting to run/debug an existing file.

--
assignee: ronaldoussoren
components: IDLE, Macintosh
messages: 92415
nosy: dpogg1, ronaldoussoren
severity: normal
status: open
title: IDLE 2.6.1 locks up on Mac OS 10.6
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue6863] Wrong linker command if CXX set to "ccache g++"

2009-09-08 Thread Pertti Kellomäki

New submission from Pertti Kellomäki :

If the compiler command in CXX contains more than one word, e.g. "ccache
g++", line 256 in distutils/unixccompiler.py only picks the first word
as the linker and discards the rest:

linker[i] = self.compiler_cxx[i]

On Ubuntu 9.04 the values of the variables are:

(Pdb) print linker
['gcc', '-pthread', '-shared', '-Wl,-O1', '-Wl,-Bsymbolic-functions']
(Pdb) print self.compiler_cxx
['ccache', 'g++']
(Pdb)

--
assignee: tarek
components: Distutils
messages: 92414
nosy: perttikellomaki, tarek
severity: normal
status: open
title: Wrong linker command if CXX set to "ccache g++"
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-09-08 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

Indeed. I see that now. I'll track down how that happened and see that we 
avoid regression.

> Amaury Forgeot d'Arc  added the comment:
>
> Your patch re-adds the compatibility code with Windows 95
> (unicode_file_names, check_gfax...), which has been removed two months
> ago, see r73603 and r73675. Please remove it!

--
title: Add os.link() and os.symlink() and   os.path.islink() support for 
Windows -> Add os.link() and os.symlink() and os.path.islink() support for 
Windows
Added file: http://bugs.python.org/file14860/smime.p7s

___
Python tracker 

___

smime.p7s
Description: S/MIME cryptographic signature
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6804] IDLE: Detect Python files even if name doesn't end in .py

2009-09-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This makes sense, but the code should:
- not make the query when the extension is empty
- catch the WindowsError raised when the extension is not in the registry.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-09-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Your patch re-adds the compatibility code with Windows 95
(unicode_file_names, check_gfax...), which has been removed two months
ago, see r73603 and r73675. Please remove it!

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue6862] exec(), locals() and local variable access

2009-09-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

When the parser analyzes the test() function, it determines that 'u' in
"print(u)" is a global variable. But exec modifies the local namespace...

You could add a "u=None" near the start of the function, or better,
always use a namespace for the exec statement:

d = {}
exec v1 in d
en = d['u']

--
nosy: +amaury.forgeotdarc
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue6862] exec(), locals() and local variable access

2009-09-08 Thread john zeng

New submission from john zeng :

Can you help me understand why variable `u' is not accessible after 
exec()? Is this sort of a late binding issue?

def test(v1):
print(v1)
print("Before exec(): " + str(locals()))
exec(v1)
print("After  exec(): " + str(locals()))
#   This fails:
#print(u)
#   This is workaround:
en = locals()['u']
print(en)

v1="u=4"
test(v1)

--
components: Interpreter Core
messages: 92409
nosy: ooev
severity: normal
status: open
title: exec(), locals() and local variable access
type: behavior
versions: Python 3.1

___
Python tracker 

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