Solve a Debate

Steve Holden steve at holdenweb.com
Sat Feb 16 17:35:31 EST 2008


castironpi at gmail.com wrote:
> On Feb 15, 11:50 pm, Steve Holden <st... at holdenweb.com> wrote:
>> Dan Bishop wrote:
>>> On Feb 15, 10:24 am, nexes <nexes... at gmail.com> wrote:
[...]
>>>> What are everyone else's thoughts on this?
>>> days_in_month = lambda m: m - 2 and 30 + bool(1 << m & 5546) or 28
>> Elegant, but the 5546 is way too magical for readability.
> 
>>>> int( '0101010110101'[::-1], 2 )
> 5546

Yes, I'm aware of that. Adding it as a comment might help.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list