Ian Kelly wrote:
> Thomas 'PointedEars' Lahn wrote:
>> Both variants work (even in Py3) if you only define [a named argument].
>> You have to define [a keyword argument, e.g. `kwargs'].
>>
>> so that
>>
>> data1.merge_with(data2, True);
>>
>> is a syntax error ("TypeError: merge_with() takes exact
In article <4e55f604$0$29973$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> [1] This is the Internet. There's *always* a certain amount of disagreement.
No there's not.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Aug 25, 2011 at 3:29 AM, Thomas 'PointedEars' Lahn
wrote:
> Both variants work (even in Py3) if you only define
>
> class Data(object):
> def merge_with(self, bar, overwrite_duplicates):
> pass
>
> data1 = Data()
> data2 = Data()
>
> You have to define
>
> class Data(object):
> def me
Stefan Behnel wrote:
> Thomas 'PointedEars' Lahn, 25.08.2011 11:29:
>> Stefan Behnel wrote:
>>> It's totally unreadable to find this in the code:
>>>
>>> data1.merge_with(data2, true);
>>>
>>> Requires you to either a) know the underlying signature by heart, or b)
>>> look it up before under
Thomas 'PointedEars' Lahn, 25.08.2011 11:29:
Stefan Behnel wrote:
It's totally unreadable to find this in the code:
data1.merge_with(data2, true);
Requires you to either a) know the underlying signature by heart, or b)
look it up before understanding the code.
It's a lot harder to argue
On 8/25/2011 3:13 AM, Steven D'Aprano wrote:
One design principle often mentioned here (with a certain degree of
disagreement[1]) is the idea that as a general rule, you shouldn't write
functions that take a bool argument to switch between two slightly
different behaviours.
This is a principle o
Stefan Behnel wrote:
> Maarten, 25.08.2011 09:52:
>> On Aug 25, 9:13 am, Steven D'Aprano wrote:
>>> One design principle often mentioned here (with a certain degree of
>>> disagreement[1]) is the idea that as a general rule, you shouldn't write
>>> functions that take a bool argument to switch bet
Maarten, 25.08.2011 09:52:
On Aug 25, 9:13 am, Steven D'Aprano wrote:
One design principle often mentioned here (with a certain degree of
disagreement[1]) is the idea that as a general rule, you shouldn't write
functions that take a bool argument to switch between two slightly
different behaviou
On Aug 25, 9:13 am, Steven D'Aprano wrote:
> One design principle often mentioned here (with a certain degree of
> disagreement[1]) is the idea that as a general rule, you shouldn't write
> functions that take a bool argument to switch between two slightly
> different behaviours.
>
> This is a pri
One design principle often mentioned here (with a certain degree of
disagreement[1]) is the idea that as a general rule, you shouldn't write
functions that take a bool argument to switch between two slightly
different behaviours.
This is a principle often championed by the BDFL, Guido van Rossum.
10 matches
Mail list logo