def method1(a = None):
print a
i can call it by
method1(*(), **{'a' : 1})
I am just curious why it works and how it works?
and what do *() and **{'a' : 1} mean?
when I type *() in python shell, error below happens
File "", line 1
*()
^
SyntaxError: invalid syntax
--
http://m
create an object of "SomeClass",
but if "SomeClass" has a class method named "method1", "method1" will be used
to finish the job.
and i get it. the context is useful.
On 2012/02/14, at 18:52, Cameron Simpson wrote:
> On 14Feb2012 13:13, Zheng Li wrote:
&
eron Simpson wrote:
> On 13Feb2012 15:59, Zheng Li wrote:
> | how to tell a method is class method or static method or instance method?
>
> Maybe a better question is:
> under what circumstances do you need to figure this out?
>
> I'm actually quite serious here. Ple
how to tell a method is class method or static method or instance method?
--
http://mail.python.org/mailman/listinfo/python-list
Thank you
On 2012/02/10, at 0:36, John Posner wrote:
> On 2:59 PM, Devin Jeanpierre wrote:
>
>
>> It is kind of funny that the docs don't ever explicitly say what a
>> property is. http://docs.python.org/library/functions.html#property --
>> Devin
>
> Here's a writeup that does:
> http://wiki
class A(object):
@properymethod
def value1(self):
return 'value1'
def value2(self):
return 'value2'
what is the difference between value1 and value2.
--
http://mail.python.org/mailman/listinfo/python-list