s without resorting
> to a bit bashing loop.
Python's string formatting and sequence types are quite powerful.
--
\ “As far as the laws of mathematics refer to reality, they are |
`\not certain, and as far as they are certain, they do not refer |
_o__) to reality.” —Albert Einstein, 1983 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
SQLAlchemy -> Database :: Python -> Assembly Language.
I think you're making my point for me :-)
--
\ “Philosophy is questions that may never be answered. Religion |
`\ is answers that may never be questioned.” —anonymous |
_o__)
completely
*unencrypted* HTTP connection. No, the opposite is true.
--
\ “DRM doesn't inconvenience [lawbreakers] — indeed, over time it |
`\ trains law-abiding users to become [lawbreakers] out of sheer |
_o__)frustration.” —Charles Stross, 2010-05-09 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
his will gratify some people, and astonish |
`\the rest.” —Mark Twain |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> On Wednesday 27 May 2015 14:39, Ben Finney wrote:
>
> > That kind of homophobic slur is inappropriate from anyone in this
> > community. Kindly cut it out altogether.
>
> I look forward to the day when people would read the earlier insult
&g
vice-president of Microsoft Windows |
_o__) development |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> Steven D'Aprano writes:
>
> > but how do I tell open() to use MyFile?
>
> I haven't used it, but does the ‘opener’ parameter do what you want?
No, it doesn't; the ‘opener’ parameter doesn't have any say in the type
of object return
y L. Mencken |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
evaluates to False always, and/or is a
> boolean comparison equivalent to ==/!= under the hood?
No, it applies to None because it is a singleton and designed to be a
sentinel value.
--
\ “A fine is a tax for doing wrong. A tax is a fine for doing |
`\
s not
universal.
You'll need to see the documentation for ‘modprobe(1)’ to find out what
its different exit status values mean.
--
\ “The Vatican is not a state.… a state must have people. There |
`\are no Vaticanians.… No-one gets born in the Vatican except by |
_o__)
to play any musical instrument: all you have to do |
`\ is touch the right key at the right time and the instrument |
_o__) will play itself.” —Johann Sebastian Bach |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
s not understanding it.” —Upton Sinclair, |
_o__) 1935 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Laura Creighton writes:
> In a message of Thu, 18 Jun 2015 10:04:46 +1000, Ben Finney writes:
> >Since the introduction of keyword-only arguments in Python functions,
> >the question arises of how to communicate this in documentation.
>
> I suppose it is way too late to s
e of configuration files read.
--
\ “I do not believe in forgiveness as it is preached by the |
`\church. We do not need the forgiveness of God, but of each |
_o__) other and of ourselves.” —Robert G. Ingersoll |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ection.
--
\ “Capitalism has destroyed our belief in any effective power but |
`\ that of self interest backed by force.” —George Bernard Shaw |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Dan Stromberg writes:
> On Tue, Jun 23, 2015 at 5:33 PM, Ben Finney
> wrote:
> > Dan Stromberg writes:
> >
> >> Is there a way of getting the key used by the dictionary, short of
> >> storing a reference to it in the value, or using a second dictionary?
&
“I used to be an airline pilot. I got fired because I kept |
`\ locking the keys in the plane. They caught me on an 80 foot |
_o__) stepladder with a coathanger.” —Steven Wright |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ew__ is a class method …”. Am I wrong?
--
\“Cooles & Heates: If you want just condition of warm in your |
`\room, please control yourself.” —air conditioner instructions, |
_o__) Japan |
Ben Finney
--
https://mail.pytho
ions’, and if you got a different |
_o__) ‘impression’, so what, can't we all be brothers?” —Jack Handey |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
e added to those keys
which should match arbitrary trailing items: not ‘('foo', 'bar', 'baz')’
but ‘('lorem', 'ipsum')’.
The trouble I'm having is that the keys in the mapping, and the
candidate sequences, are simple tuples. Adding a sentinel ite
g type, that would need to be customised for this
application?
--
\ “If we listen only to those who are like us, we will squander |
`\ the great opportunity before us: To live together peacefully in |
_o__)a world of unresolved differences.” —David Weinberger |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Terry Reedy writes:
> On 7/15/2015 9:51 PM, Ben Finney wrote:
> > What well-defined data type exists with the following properties:
> >
> > * Mapping, key → value.
> >
> > * Each key is a sequence (e.g. `tuple`) of items such as text strings.
> >
> &
scover I made a bad API
design decision.
--
\ “When a well-packaged web of lies has been sold to the masses |
`\over generations, the truth will seem utterly preposterous and |
_o__)its speaker a raving lunatic.” —Dresden James |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ethan Furman writes:
> On 07/15/2015 10:53 PM, Ben Finney wrote:
> > Are those the ‘__contains__’, ‘__getitem__’ methods? What actually
> > is the API of a mapping type, that would need to be customised for
> > this application?
>
> The problem is that potential key
Zachary Ware writes:
> On Thu, Jul 16, 2015 at 1:31 AM, Ben Finney
> wrote:
> > Fine by me. What is the mapping API that needs to be implemented though?
>
> Have a look at collections.MutableMapping.
Thank you, that's great! I hadn't realised the ‘collections’ m
e of characters) that happen
to contain digits.
--
\“Simplicity is prerequisite for reliability.” —Edsger W. |
`\ Dijkstra |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
2005-01-18 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
which is a valuable skill and very much worth your while :-)
--
\ “If you always want the latest and greatest, then you have to |
`\ buy a new iPod at least once a year.” —Steve Jobs, MSNBC |
_o__) interview 2006-05-25 |
Ben Finney
--
ht
say, ‘Emo, do people really come up |
`\to you?’” —Emo Philips |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ter
alternatives (including avoiding GMail entirely).
--
\ “If I had known what it would be like to have it all... I might |
`\ have been willing to settle for less.” —Jane Wagner, via Lily |
_o__) Tomlin |
Ben Finney
--
https:/
while you
develop them.
--
\“I think it would be a good idea.” —Mohandas K. Gandhi (when |
`\asked what he thought of Western civilization) |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
t support it.
--
\ “Simplicity and elegance are unpopular because they require |
`\ hard work and discipline to achieve and education to be |
_o__)appreciated.” —Edsger W. Dijkstra |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Cecil Westerhof writes:
> On Sunday 2 Aug 2015 13:54 CEST, Ben Finney wrote:
>
> > So, both XML and JSON should be considered write-only, and produced
> > only for consumption by a computer; they are a poor choice for
> > presenting to a human.
>
> Well, I would
ot seem to be much use |
`\ being anything else.” —Winston Churchill, 1954-11-09 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
collect the responses if so.
--
\ “The Stones, I love the Stones; I can't believe they're still |
`\ doing it after all these years. I watch them whenever I can: |
_o__)Fred, Barney, ...” —Steven Wright |
Ben Finney
--
https://mail.python.org/ma
all its contents.” —Howard Philips |
_o__)Lovecraft |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ficial Propaganda_, 1928 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
e the class definition with the list comprehension and
*not* keep the incidental names — in code that will run correctly on
both Python 2 and Python 3?
--
\ “Pinky, are you pondering what I'm pondering?” “Well, I think |
`\ so, but *where* do you stick the feather and call it macaroni?” |
_o__) —_Pinky and The Brain_ |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
legant, expressive, and has the right
behaviour on both Python 2 and Python 3.
--
\ “I turned to speak to God/About the world's despair; But to |
`\ make bad matters worse/I found God wasn't there.” —Robert Frost |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
advertisement, Hong Kong |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Peter Otten <__pete...@web.de> writes:
> Ben Finney wrote:
>
> > Peter Otten <__pete...@web.de> writes:
> >
> > That's an unexpected inconsistency between list comprehensions
> > versus generator expressions, then. Is that documented explicit
be able to entertain a |
`\ thought without accepting it.” —Aristotle |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Alternative explanations are always welcome in science, if |
`\ they are better and explain more. Alternative explanations that |
_o__) explain nothing are not welcome.” —Victor J. Stenger, 2001-11-05 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
goes downhill from there.” —Will Larson, 2008-11-04 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ntial to keeping our community healthy.
--
\“Technology is neither good nor bad; nor is it neutral.” |
`\ —Melvin Kranzberg's First Law of Technology |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
rom |
`\ bad judgement.” —Frederick P. Brooks |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
l instrument: all you have to do |
`\ is touch the right key at the right time and the instrument |
_o__)will play itself.” —Johann Sebastian Bach |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
't |
`\ notice until I got it set up. People complained because they |
_o__) couldn't see the lake.” —Steven Wright |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
rambius writes:
> Hello,
>
> петък, 21 август 2015 г., 21:43:19 UTC-4, Ben Finney написа:
> > The ‘testscenarios’ library is one way to have a set of scenarios
> > applied at run-time to produce tests across all combinations
> > https://pypi.python.org/pypi/testsce
ctually” floats?
In JSON there is no distinction at all, the only numeric type is
‘float’. What information is there in the input that can be used to know
which values should result in an ‘int’ instance, versus values that
should result in a ‘float’ instance?
--
\ “I'm
plan it and engage in it. They get the war they create.
--
\ “Capitalism is the astounding belief that the most wickedest of |
`\men will do the most wickedest of things for the greatest good |
_o__) of everyone.” —John Maynard Keynes |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
constructed row.
Perhaps you want::
for input_record in results:
output_record = [input_record.get(key, "") for key in input_record]
writer.writerow(output_record)
--
\ “An idea isn't responsible for the people who believe in it.” |
`\ —Donald Robert Perry Marquis |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ell-behaved Unix
daemon process.
--
\ “One time I went to a drive-in in a cab. The movie cost me |
`\ ninety-five dollars.” —Steven Wright |
_o__) |
Ben Finney
--
https://mail.python.
half of a single petitioner confessedly unworthy.” —Ambrose |
_o__) Bierce, _The Devil's Dictionary_, 1906 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
single
executable file – is quite useful.
--
\“Some people, when confronted with a problem, think ‘I know, |
`\ I'll use regular expressions’. Now they have two problems.” |
_o__) —Jamie Zawinski, in alt.religion.emacs |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
help beginners in Python.
--
\ “Reichel's Law: A body on vacation tends to remain on vacation |
`\unless acted upon by an outside force.” —Carol Reichel |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
is the new radio.” —Neil Young, 2008-05-06 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Mario Figueiredo writes:
> On 09-09-2015 02:26, Ben Finney wrote:
> > Mario Figueiredo writes:
> >
> >> You know, it is a pointless exercise to try and downplay
> >> programming languages (any programming language) that has proven
> >> its worth by
outine.
Agreed.
--
\ “Anyone who puts a small gloss on [a] fundamental technology, |
`\ calls it proprietary, and then tries to keep others from |
_o__) building on it, is a thief.” —Tim O'Reilly, 2000-01-25 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
cribe using a non-email method such as
NNTP.
--
\ “Courage is not the absence of fear, but the decision that |
`\ something else is more important than fear.” —Ambrose Redmoon |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ne who believes exponential growth can go on forever in a |
`\finite world is either a madman or an economist.” —Kenneth |
_o__) Boulding |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
g station. These ‘targets’ can shoot back.” —Michael |
_o__) Rathbun to advertisers, news.admin.net-abuse.email |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
e*, then I'll
know you are sent to us as an evil spirit to make all software suck.
--
\ “Nothing exists except atoms and empty space; everything else |
`\ is opinion.” —Democritus |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
“The optimist thinks this is the best of all possible worlds. |
`\ The pessimist fears it is true.” —J. Robert Oppenheimer |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
s a distinct value; you
can only use them to refer to the object at the other end.
--
\ “If we don't believe in freedom of expression for people we |
`\ despise, we don't believe in it at all.” —Noam Chomsky, |
_o__)
Random832 writes:
> Ben Finney writes:
> > With the significant difference that “pointer” implies that it has its
> > own value accessible directly by the running program, such as a pointer
> > in C.
>
> Its own value *is* what you're accessing when you
Random832 writes:
> Ben Finney writes:
>
> > Random832 writes:
> >
> >> Ben Finney writes:
> >> > With the significant difference that “pointer” implies that it has its
> >> > own value accessible directly by the running program, such as
Random832 writes:
> Ben Finney writes:
> > The reference value is inaccessible to the program, it can only be
> > used to get at the referenced object.
>
> What does it mean to access something, if not to do some operation on
> it? Getting the referenced object is the o
Rustom Mody writes:
> On Saturday, September 12, 2015 at 11:57:01 AM UTC+5:30, Ben Finney wrote:
> > You've clearly committed to some ontology that just doesn't match
> > the Python data model.
>
> How about lay-English ontology in which "point to" and &q
ve always wished for my computer to be as easy to use as |
`\ my telephone; my wish has come true because I can no longer |
_o__) figure out how to use my telephone.” —Bjarne Stroustrup |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
nprompted.
--
\ “I call him Governor Bush because that's the only political |
`\ office he's ever held legally.” —George Carlin, 2008 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ttp://www.artima.com/weblogs/viewpost.jsp?thread=4829>, mine is a
small refinement of that.
--
\ “It is the fundamental duty of the citizen to resist and to |
`\ restrain the violence of the state.” —Noam Chomsky, 1971 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
misunderstand Pyarmor's operation.
--
\ “Any fool can write code that a computer can understand. Good |
`\ programmers write code that humans can understand.” —Martin |
_o__) Fowler, _Refactoring_, 2000 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
is better than actually WORKING for a |
_o__) living.” —ringsnake.livejournal.com, 2007-11-12 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
will squander |
`\ the great opportunity before us: To live together peacefully in |
_o__)a world of unresolved differences.” —David Weinberger |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
_o__) hopes of its children.” —Dwight Eisenhower, 1953-04-16 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
n computer,
is quite hostile. Please don't enable such restrictions.
--
\ “We must find our way to a time when faith, without evidence, |
`\disgraces anyone who would claim it.” —Sam Harris, _The End of |
_o__) Faith_, 2004 |
Be
how people run programs on their own computers.
--
\ “It ain't so much the things we don't know that get us in |
`\trouble. It's the things we know that ain't so.” —Artemus Ward |
_o__) (1834–1867), U.S. journalist |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
confront. Don't dare ever see your life as |
_o__)boring, monotonous, or joyless.” —Richard Dawkins, 2010-03-10 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
tion, or end-user
documentation?
--
\ “I still have my Christmas Tree. I looked at it today. Sure |
`\ enough, I couldn't see any forests.” —Steven Wright |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
’?
--
\ “Not using Microsoft products is like being a non-smoker 40 or |
`\ 50 years ago: You can choose not to smoke, yourself, but it's |
_o__) hard to avoid second-hand smoke.” —Michael Tiemann |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> In Python 2.7, I am seeing this behaviour for ‘print’::
>
> Python 2.7.10 (default, Sep 13 2015, 20:30:50)
> [GCC 5.2.1 20150911] on linux2
> Type "help", "copyright", "credits" or "license" for more informa
erage American family |
_o__) hasn't time for it.” —_The New York Times_, 1939 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
which after he hath killed hath power to cast into |
`\ hell; yea, I say unto you, Fear him.” –Jesus, as quoted in Luke |
_o__) 12:5 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Terry Reedy writes:
> On 10/6/2015 6:45 AM, Ben Finney wrote:
> > Ben Finney writes:
>
> > How can I convince ‘print’, everywhere throughout a module, that it
> > should coerce its arguments using ‘unicode’?
>
> Use Python 3. I am only half joking. Switching to
dynamic typing.
--
\ “When cryptography is outlawed, bayl bhgynjf jvyy unir |
`\ cevinpl.” —Anonymous |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
“The idea that He would take his attention away from the |
`\ universe in order to give me a bicycle with three speeds is |
_o__) just so unlikely that I can't go along with it.” —Quentin Crisp |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Random832 writes:
> Ben Finney writes:
> > The opposite of string typing is weak typing.
>
> Well, I would say *string* typing [as used in, for example, sh and tcl]
> is actually a form of weak typing.
I infer a smile as you write that, but to clarify for others: I made a
`\ for democracy.” —Carl Sagan |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
emporary safety, deserve neither liberty nor safety.” |
_o__) —Benjamin Franklin, 1775-02-17 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
, |
`\ it breeds contempt for the law.” —Justice Louis Brandeis |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
so, Brain, but three men in a tub? Ooh, that's unsanitary!” |
_o__) —_Pinky and The Brain_ |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
g the origin of that term?
--
\ “You can be a theist, and you can be a skeptic. But if you're |
`\ both, you're not very good at one of them.” —Dave Silverman, |
_o__) 2011-11-19 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
.
--
\ “When people believe that they have absolute knowledge, with no |
`\ test in reality, this [the Auschwitz crematorium] is how they |
_o__) behave.” —Jacob Bronowski, _The Ascent of Man_, 1973 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
aith, _Money: Whence It |
_o__) Came, Where It Went_, 1975 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
what exists, given that theories often change under pressure |
_o__) from further investigation.” —Thomas W. Clark, 2009 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
l defend to the |
`\death your right to mis-attribute this quote to Voltaire.” |
_o__) —Avram Grumer, rec.arts.sf.written, 2000-05-30 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
n billion dollars? That money |
`\must be worth a fortune!” —The Goon Show, _The Sale of |
_o__) Manhattan_ |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
unting!
--
\ “Ridicule is the only weapon which can be used against |
`\ unintelligible propositions.” —Thomas Jefferson, 1816-07-30 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
1701 - 1800 of 4138 matches
Mail list logo