Aahz wrote:
In article <mailman.2244.1261418090.2873.python-l...@python.org>,
Jean-Michel Pichavant <jeanmic...@sequans.com> wrote:
class A:
def __init__(self, foo = None, bar = None):
if len(foo) > 5:
raise ValueError('foo cannot exceed 5 characters')
Bad Idea -- what happens when foo is None?
You're right.
That perfectly illustrates how the simplest solution is the often most
valuable one: it is much more easy to find bugs, when there is any.
JM
--
http://mail.python.org/mailman/listinfo/python-list