[Python-bugs-list] [ python-Feature Requests-622230 ] def object.new_method(self):

noreply@sourceforge.net noreply@sourceforge.net
Fri, 11 Oct 2002 23:08:02 -0700


Feature Requests item #622230, was opened at 2002-10-12 02:04
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=622230&group_id=5470

Category: Parser/Compiler
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Dan Parisien (mathematician)
Assigned to: Nobody/Anonymous (nobody)
Summary: def object.new_method(self):

Initial Comment:
I want to be able to create functions inside objects 
instead of having to do:<code> 
class x: 
    pass 
def new_method(self): 
    pass 
x.new_method = new_method 
del new_method 
</code> 
I want to do: <code> 
class x: 
    pass 
def x.new_method(self): 
    pass 
</code> 
Why isn't this possible? Wouldn't it be cool? 
 

----------------------------------------------------------------------

>Comment By: Dan Parisien (mathematician)
Date: 2002-10-12 02:08

Message:
Logged In: YES 
user_id=118203

Repost with attempted better formatting: 
 
I don't want to do: 
class x: 
&nbsp;&nbsp;&nbsp;&nbsp;pass 
def new_method(self): 
&nbsp;&nbsp;&nbsp;&nbsp;pass 
x.new_method = new_method 
del new_method 
 
I want to do: 
class x: 
&nbsp;&nbsp;&nbsp;&nbsp;pass 
def x.new_method(self): 
&nbsp;&nbsp;&nbsp;&nbsp;pass 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=622230&group_id=5470