On Fri, Apr 6, 2012 at 4:08 AM, Roy Smith <r...@panix.com> wrote:
>> If you are working with data that is representable as either an integer
>> or a string, choose one and stick to it.  Treating it as both/either will
>> eventually lead to grief.
>>
>> Or, in other words: 1 != '1'
>
> Tell that to the PHP crowd :-)

I think this example highlights a major point about gotchas: the
difference between an obvious language feature and a gotcha depends on
where you come from. To a PHP programmer, 1 and "1" are in many ways
indistinguishable. To a C programmer, they're utterly incompatible.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to