Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion python coding contest
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim Hochberg  
View profile  
 More options Dec 28 2005, 9:49 am
Newsgroups: comp.lang.python
From: Tim Hochberg <tim.hochb...@ieee.org>
Date: Wed, 28 Dec 2005 07:49:29 -0700
Local: Wed, Dec 28 2005 9:49 am
Subject: Re: python coding contest

Marius Gedminas wrote:
> Jean-Paul Calderone wrote:

>>On Tue, 27 Dec 2005 14:02:57 -0700, Tim Hochberg <tim.hochb...@ieee.org> wrote:

>>>Shane Hathaway wrote:

>>>>Paul McGuire wrote:

>>>>Also, here's another cheat version.  (No, 7seg.com does not exist.)

>>>>   import urllib2
>>>>   def seven_seg(x):return urllib2.urlopen('http://7seg.com/'+x).read()

>>>And another one from me as well.

>>>class a:
>>> def __eq__(s,o):return 1
>>>seven_seg=lambda i:a()

>>This is shorter as "__eq__=lambda s,o:1".

> Or even

>   class seven_seg(str):__eq__=lambda*a:1

> 39 characters; passes the test suite.  I'm sure it would be
> disqualified for cheating, though. :-)

Tricky. That leads to this 30 character gem:

class seven_seg(str):__eq__=id

-tim

>>But I can't find the first post in this thread... What are you
>>guys talking about?

> http://www.pycontest.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.