Re: [Tutor] class/type methods/functions

2008-10-30 Thread Kent Johnson
On Thu, Oct 30, 2008 at 4:09 PM, spir <[EMAIL PROTECTED]> wrote: > Well, would someone clarify the point about decorators? Rather the point of > having both a built-in function (introduced in python 2.2, as I just read) > and a "decorator" (2.4) for a single use of declaring a method > not_to_be_b

Re: [Tutor] class/type methods/functions

2008-10-30 Thread spir
Hello again, I just tried with the classmethod() built_in function. Well, this is exactly what I was looking for. It supplies a way of defining type_level methods -- what was missing before. [I still think this is a workaround: we would not need this if the syntax was the same for methods and

Re: [Tutor] class/type methods/functions

2008-10-30 Thread A.T.Hofkamp
spir wrote: Q: Is there a way to write /type/ (class) functions, meaning methods not bound to an instance, in python? As Bob Gailer already said, staticmethod seems to do what you want. After reading your mail, I cannot help wondering that something crucial seems to be missing in your class s

Re: [Tutor] class/type methods/functions

2008-10-30 Thread bob gailer
spir wrote: Hello, New to the list. I'm a self-taught, amateur programmer. Also, non-native english speaker -- so, don't be surprised with weird expression. Q: Is there a way to write /type/ (class) functions, meaning methods not bound to an instance, in python? Take a look at the built-i

[Tutor] class/type methods/functions

2008-10-30 Thread spir
Hello, New to the list. I'm a self-taught, amateur programmer. Also, non-native english speaker -- so, don't be surprised with weird expression. Q: Is there a way to write /type/ (class) functions, meaning methods not bound to an instance, in python? Context: I'm developping an application