M
Michael Rudolf
Just a quick question about what would be the most pythonic approach in
this.
In Java, Method Overloading is my best friend, but this won't work in
Python:
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
a()
TypeError: a() takes exactly 1 argument (0 given)
So - What would be the most pythonic way to emulate this?
Is there any better Idom than:
if x is None:
pass
else:
pass
?
Thanks,
Michael
this.
In Java, Method Overloading is my best friend, but this won't work in
Python:
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
a()
TypeError: a() takes exactly 1 argument (0 given)
So - What would be the most pythonic way to emulate this?
Is there any better Idom than:
if x is None:
pass
else:
pass
?
Thanks,
Michael