Steven Bethard <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
>> This PEP specifies an enumeration data type for Python.
>> An enumeration is an exclusive set of symbolic names bound to
>> arbitrary unique values. Values within an enumeration can be iterated
>>
Toby Dickenson <[EMAIL PROTECTED]> writes:
> On Monday 27 February 2006 02:49, Ben Finney wrote:
>> Coercing a value from an enumeration to a ``str`` results in the
>> string that was specified for that value when constructing the
>> enumeration::
>
> That
Ben Finney <[EMAIL PROTECTED]> writes:
> PEP:354
> Title: Enumerations in Python
> Version:$Revision: 42186 $
> Last-Modified: $Date: 2006-01-26 11:55:20 +1100 (Thu, 26 Jan 2006) $
Most people seem to be unopposed or in favour of some kind of
enu
der |
`\will lose both, and deserve neither." -- Thomas Jefferson, in |
_o__) a letter to Madison |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
-- Alvin Toffler |
_o__) |
Ben Finney <[EMAIL PROTECTED]>
--
http://mail.python.org/mailman/listinfo/python-list
I said nothing, for verbing |
`\weirds language. Then, they arrival for the nouns and I speech |
_o__)nothing, for I no verbs." -- Peter Ellis |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
quot;If you saw two guys named Hambone and Flippy, which one would |
`\ you think liked dolphins the most? I'd say Flippy, wouldn't |
_o__) you? You'd be wrong, though. It's Hambone." -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
`\ it, it said 'Day 1: Still tired from the move. Day 2: Everybody |
_o__) talks to me like I'm an idiot.'" -- Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
7;666', 'Robot ')
--
\ "Buy not what you want, but what you need; what you do not need |
`\ is expensive at a penny." -- Cato, 234-149 BC, Relique |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ons he is |
_o__) allowed to take." -- C. Northcote Parkinson |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ion you're using are 'KiB',
'MiB', 'GiB' and so on.
http://en.wikipedia.org/wiki/Binary_prefix>
Dividing by 1024 doesn't give 'kb', it gives 'KiB'. Likewise for the
rest of the units. So the list of units should be::
['by
ted from a dict
type.
--
\"Madness is rare in individuals, but in groups, parties, |
`\ nations and ages it is the rule." -- Friedrich Nietzsche |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
|
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
the room talking to you, which is why I don't like to |
_o__) read good books." -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
e's a DRM, what it is, and how it |
`\ works, we've already failed." -- Peter Lee, Disney |
_o__) corporation, 2005 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ght find the Urwid library
helpful. http://excess.org/urwid/>
--
\ "I was in a bar the other night, hopping from barstool to |
`\ barstool, trying to get lucky, but there wasn't any gum under |
_o__) any of them." -- Emo Philip
class(object):
# foo
--
\ "When I get real bored, I like to drive downtown and get a |
`\ great parking spot, then sit in my car and count how many |
_o__) people ask me if I'm leaving." -- Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
uld be hard
are welcome to do so.
--
\ "The most common way people give up their power is by thinking |
`\they don't have any." -- Alice Walker |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ot;Killing the creator was the traditional method of patent |
`\ protection" -- Terry Pratchett, _Small Gods_ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
tatic class" would do? That is,
what features do you require that you can't find how to implement?
--
\ "I've always wanted to be somebody, but I see now that I should |
`\have been more specific." -- Jane Wagner, via Lily Tomlin |
_o__)
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> On Jun 19, 3:27 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
> > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> > > Just to be more precise: curses is not a requirement, a
> > &g
sure what you mean. What would you apply polymorphism to, and
what would be the desired result?
--
\"I used to work in a fire hydrant factory. You couldn't park |
`\ anywhere near the place." -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ml>
http://mail.python.org/pipermail/python-list/2006-August/398321.html>
--
\ "I hope if dogs ever take over the world, and they chose a |
`\king, they don't just go by size, because I bet there are some |
_o__) Chihuahuas with some good ideas.&q
k." -- |
_o__) Groucho Marx |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
t inside the function?
--
\ "It is well to remember that the entire universe, with one |
`\ trifling exception, is composed of others." -- John Andrew |
_o__) Holmes |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
may be defined briefly as an illogical belief in the |
`\ occurrence of the improbable." -- Henry L. Mencken |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
owngrading
to "us-ascii".
--
\ "I lost a button-hole." -- Steven Wright |
`\ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
existing
Python keywords.
--
\ "The way to build large Python applications is to componentize |
`\ and loosely-couple the hell out of everything." -- Aahz |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
suspicious." -- Henry L. Mencken |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ep perl sed, df du, du-du du-du, vi troff su fsck |
`\ rm * halt LART LART LART!" -- The Swedish BOFH, |
_o__)alt.sysadmin.recovery |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
-- David Hume |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
tests can be
as comprehensive as needed without having any impact on the actual
running program.
--
\ Legionnaire: "We have their leader captive!" C泡r: "Is he |
`\bound?" Legionnaire: "Of his health I know not, sir." -- The |
_o__)
Python 4.0 proposals will benefit from a long period of familiarity
with widely-deployed PyPy :-)
--
\ "I bought some batteries, but they weren't included; so I had |
`\ to buy them again." -- Steven Wright |
_o__)
iditur." ("Whatever is |
`\ said in Latin, sounds profound.") -- Anonymous |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
"easier to ask forgiveness than
permission".
--
\"Intellectual property is to the 21st century what the slave |
`\ trade was to the 16th." -- David Mertz |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
try. Catch that
exception at a level where there's enough context to make sense of it,
and deal with it in whatever way you see fit.
--
\ "Imagine a world without hypothetical situations." -- Anonymous |
`\ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
41/>
http://docs.python.org/whatsnew/pep-341.html>
--
\ "Military justice is to justice what military music is to |
`\ music." -- Groucho Marx |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
message will be obscured among the many other
messages in the same thread.
--
\ "I have never made but one prayer to God, a very short one: 'O |
`\ Lord, make my enemies ridiculous!' And God granted it." -- |
_o__)
`\ Thomas Watson, chairman of IBM, 1943 |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
t elephant. Then it got lost. It's in the |
`\ apartment somewhere." -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
source. I know of no
"absolutely resliable source". We work with imperfect human-provided
data all the time.
--
\ "If you ever teach a yodeling class, probably the hardest thing |
`\ is to keep the students from just trying to yodel right off. |
_o__)
e not already in those three categories can presumably find a
decent half as well.
--
\"Intellectual property is to the 21st century what the slave |
`\ trade was to the 16th." -- David Mertz |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
us because of those who do harm but |
`\ because of those who look at it without doing anything." -- |
_o__) Albert Einstein |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
aker of your
existing one to fix it), not to munge those fields to accomodate your
broken MUA.
--
\ "Dyslexia means never having to say that you're ysror." -- |
`\ Anonymous |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
\ "Pinky, are you pondering what I'm pondering?" "Well, I think |
`\ so, Brain, but first you'd have to take that whole bridge |
_o__) apart, wouldn't you?" -- _Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
will be warm for the rest of his life." -- |
_o__) John A. Hrastar |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
'm pondering?" "I think so, |
`\Brain, but culottes have a tendency to ride up so." -- _Pinky |
_o__) and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ession syntax, and am never surprised by a
misunderstood mathematical associativity or precedence rule.
--
\"A hundred times every day I remind myself that [...] I must |
`\ exert myself in order to give in the same measure as I have |
_o__) received and am stil
guilty, in a way. We all shot him, we all |
`\ skinned him, and we all got a complimentary bumper sticker that |
_o__) said, 'I helped skin Bob.'" -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
lean value and not a faked one that is "really" an integer.
--
\"Pinky, are you pondering what I'm pondering?" "Wuh, I think |
`\ so, Brain, but wouldn't anything lose its flavor on the bedpost |
_o__) overnight?"
er chance of being caught and fixed *before*
innocent hands get ahold of them.
--
\"We have to go forth and crush every world view that doesn't |
`\ believe in tolerance and free speech." -- David Brin |
_o__)
ic.
--
\"Consider the daffodil. And while you're doing that, I'll be |
`\ over here, looking through your stuff." -- Jack Handey |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
es. Here's a better explanation:
http://jtauber.com/blog/2006/04/15/python_tuples_are_not_just_constant_lists>
--
\ "No matter how cynical I get, I can't seem to keep up." -- |
`\ Lily Tomlin |
_o__)
n those criteria:
http://www.scottaaronson.com/writings/bignumbers.html>
--
\ "I stayed up all night playing poker with tarot cards. I got a |
`\ full house and four people died." -- Steven Wright |
_o__)
it.
--
\ "I wish there was a knob on the TV to turn up the intelligence. |
`\ There's a knob called 'brightness' but it doesn't work." -- |
_o__) Eugene P. Gallagher |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
--
\ "I don't like country music, but I don't mean to denigrate |
`\ those who do. And for the people who like country music, |
_o__) denigrate means 'put down'." -- Bob Newhart |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
standard Python mappings do: by iterating over the keys.
--
\"If you continue running Windows, your system may become |
`\ unstable." -- Microsoft, Windows 95 BSOD message |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ce to
that object, just like any other name.
Hope that helps.
--
\ "If you ever teach a yodeling class, probably the hardest thing |
`\ is to keep the students from just trying to yodel right off. |
_o__) You see, we build to that." -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
it well." -- Rene Descartes |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > Which is a bug in the 'email.message' module, in my view. If it's
> > attempting to support a mapping protocol, it should allow
> > iteration the same way standard Python mappings do
straction
level provided by the language, and isn't forced to be always mindful
of the inner workings if the current implementation.
--
\"To me, boxing is like a ballet, except there's no music, no |
`\choreography, and the dancers hit each other." -- Jack H
27; out there. It's just an awful lot of |
_o__) 'us'." -- Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
d up a larger room." -- Groucho Marx |
`\ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
every culture, is the story of Popeye." -- Jack Handey |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
"If you go parachuting, and your parachute doesn't open, and |
`\you friends are all watching you fall, I think a funny gag |
_o__) would be to pretend you were swimming." -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
u pondering what I'm pondering?" "Well, I think |
`\ so, Brain, but I can't memorize a whole opera in Yiddish." -- |
_o__)_Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
pair of Capri pants?" -- _Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
bj):
self.foo = do_stuff(obj)
aobj = B(42)
--
\"Pinky, are you pondering what I'm pondering?" "Wuh, I think |
`\ so, Brain, but if we didn't have ears, we'd look like weasels." |
_o__) -- _Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ar I'm running the build manually.
--
\"Read not to contradict and confute, nor to believe and take |
`\ for granted ... but to weigh and consider." -- Francis Bacon |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
object?
--
\ "If [a technology company] has confidence in their future |
`\ ability to innovate, the importance they place on protecting |
_o__) their past innovations really should decline." -- Gary Barnett |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
products just aren't engineered for security." -- Brian |
`\ Valentine, senior vice-president of Microsoft Windows |
_o__) development |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Increase Your Word Power'. That thing is really, really, |
_o__) really... good." -- Homer, _The Simpsons_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
artist, the greater the doubt; perfect |
`\ confidence is granted to the less talented as a consolation |
_o__) prize." -- Robert Hughes |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
("Whatever is |
`\ said in Latin, sounds profound.") -- Anonymous |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
go by size, because I bet there are some |
_o__)Chihuahuas with some good ideas." -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
--
\ "This sentence contradicts itself -- no actually it doesn't." |
`\ -- Douglas Hofstadter |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
"Too many Indians spoil the golden egg." -- Sir Joh |
`\ Bjelke-Petersen |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
\ "Sunday School: A prison in which children do penance for the |
`\ evil conscience of their parents." -- Henry L. Mencken |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
the wheel is silly
> ofcourse
Indeed. Hopefully you will allow for polymorphism in your code.
--
\ "Probably the earliest flyswatters were nothing more than some |
`\ sort of striking surface attached to the end of a long stick." |
_o__) -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
\ "It seems intuitively obvious to me, which means that it might |
`\be wrong." -- Chris Torek |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
er. Care to enlighten me?
--
\"Conscience is the inner voice that warns us somebody is |
`\looking." -- Henry L. Mencken |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
worth more
than shorter names merely for the sake of shorter names.
--
\ "If you're a young Mafia gangster out on your first date, I bet |
`\it's real embarrassing if someone tries to kill you." -- Jack |
_o__)
he modules added to the standard library one day. I
think using lower_case for names is good style in all Python code, for
consistency.
--
\ "You could augment an earwig to the point where it understood |
`\ nuclear physics, but it would still be a very stupid thing to |
_o__)
to indicate successful |
_o__) termination of their C programs." -- Robert Firth |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
panic." -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
|
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
hat support those prejudices.
--
\ "Are you pondering what I'm pondering?" "I think so, Brain, but |
`\ I don't think Kay Ballard's in the union." -- _Pinky and The |
_o__) Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ity. I |
`\ said 'Your Honour, who in their right mind parks in the passing |
_o__)lane?'" -- Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
a range of
13 lines. Your code snippet is only 8 lines long. So at least one of
those two lines that have warnings reported are not in the code you've
shown to us.
--
\"Too many Indians spoil the golden egg." -- Sir Joh |
`\ Bjelke-Petersen |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ously.
--
\"We have to go forth and crush every world view that doesn't |
`\ believe in tolerance and free speech." -- David Brin |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
4, in strptime
data_string[found.end():])
ValueError: unconverted data remains: .064371
The same thing happens with 'time.strptime'. So this isn't yet a
solution for the OP.
--
\ "Whatever you do will be insignificant, but it is very |
`\ important that you do it." -- Mahatma Gandhi |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
') or ('calls') or ('raises' in line)):
print "Yes"
--
\ "An eye for an eye would make the whole world blind." -- |
`\Mahatma Gandhi |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ormer must also imply that.
The former already exists, spaces are still delimiters when syntax
allows, so your conclusion is baseless.
--
\ "I got food poisoning today. I don't know when I'll use it." |
`\ -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
en I took one out and he ran around |
_o__) in circles." -- Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
.
--
\ "Pinky, are you pondering what I'm pondering?" "Well, I think |
`\ so, Brain, but first you'd have to take that whole bridge |
_o__) apart, wouldn't you?" -- _Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
the result of append() -- just
continue using the list object.
>>> print lines
['foo']
>>> lines.append("bar")
>>> print lines
['foo', 'bar']
--
\"There are only two ways to live your life. One is a
syntax for creating a
numeric literal in code.
--
\ "God forbid that any book should be banned. The practice is as |
`\ indefensible as infanticide." -- Dame Rebecca West |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
or writing literal values in code (which is proposed to change by
this), and the behaviour of operations on arbitrary values at runtime
(which is outside the scope of this proposal).
--
\"I bought a dog the other day. I named him Stay. It's fun to |
`\ call him. 'Come here, Stay! Come here, Stay!' He went insane. |
_o__) Now he just ignores me and keeps typing." -- Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
vies be more suitable for children if he was |
_o__) named Jean-Claude van Darn?" -- _Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
tes to).
--
\ "I like to reminisce with people I don't know. Granted, it |
`\ takes longer." -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
2301 - 2400 of 4138 matches
Mail list logo