On Sat, Mar 12, 2016 at 5:24 PM, Veek. M wrote:
>> Also, what's this bit:
>> self.default = default if default else type()
> But type() just gives me:
> TypeError: type() takes 1 or 3 arguments
> on py2,3
Check out the context of the original line of code and see what it's
doing. It isn't the sam
On Fri, Mar 11, 2016 at 11:24 PM, Veek. M wrote:
> Ian Kelly wrote:
>
>> On Fri, Mar 11, 2016 at 10:59 PM, Veek. M wrote:
>>> Also, what's this bit:
>>> self.default = default if default else type()
>>
>> If the default parameter has a truthy value, it gets set to
>> self.default. Otherwise, the
Chris Angelico :
> Definitely agree with this. Having a way to declare that a name is
> "truly constant" would be extremely handy;
I don't think it would be all that handy. I'm afraid all this type
hinting will turn Python into a poor man's Java.
> Maybe, but I honestly don't miss 'switch' all t
101 - 103 of 103 matches
Mail list logo