[Python-bugs-list] [ python-Bugs-433904 ] rexec: all s_* methods return None only
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 18 Jun 2001 05:34:45 -0700
Bugs item #433904, was updated on 2001-06-17 06:04
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=433904&group_id=5470
Category: Python Library
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Alex Martelli (aleax)
Assigned to: Guido van Rossum (gvanrossum)
Summary: rexec: all s_* methods return None only
Initial Comment:
D:\py21>python
Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license" for more
information.
>>> import rexec
>>> r=rexec.RExec()
>>> x=r.r_eval('2+2')
>>> print x
4
>>> x=r.s_eval('2+2')
>>> print x
None
>>>
Cause: method s_apply lacks a 'return r' at the end,
and all the other s_* methods should be 'return
self.s_apply(...' but are in fact lacking the return
keyword (they just call s_apply but ignore its result).
Alex
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-06-18 05:34
Message:
Logged In: YES
user_id=6380
Fixed, rexec.py 1.29 and 1.28.4.1.
----------------------------------------------------------------------
Comment By: Alex Martelli (aleax)
Date: 2001-06-17 23:59
Message:
Logged In: YES
user_id=60314
Yep, the patch is of course perfect, thanks. Hope it makes
it into 2.1.1 as it's so obviously flawless & necessary.
(I had never used the s_* methods, but I'm religiously
checking everything I'm writing about for the Nutshell
book, so...:-).
Alex
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-06-17 14:38
Message:
Logged In: YES
user_id=6380
Good catch. You see, rexec hasn't exactly been miss
popularity...
Does the attached patch fix this for you?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=433904&group_id=5470