Roy Smith writes:
> Ben Finney wrote:
>
> > Who says it's frowned on to do work in the initialiser? Where are they
> > saying it? That seems over-broad, I'd like to read the context of that
> > advice.
>
> There are some people who advocate that C++ co
x27;ll leave
the academic exercise to someone else.
--
\“… Nature … is seen to do all things Herself and through |
`\ herself of own accord, rid of all gods.” —Titus Lucretius |
_o__) Carus, c. 40 BCE |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
\ looks out it, and if he leans too far, he falls out. Wait. I |
_o__)guess that's like a regular window.” —Jack Handey |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
), and
removal of ‘except ExcClass, exc_instance’ (use ‘except ExcClass as
exc_instance’ instead).
--
\ “For my birthday I got a humidifier and a de-humidifier. I put |
`\ them in the same room and let them fight it out.” —Steven Wright |
_o__)
Ben Finney writes:
> Terry Reedy writes:
>
> > Since 3.0, we have added new syntax ('yield from', u'' for instance)
> > but I do not believe we have deleted or changed any syntax (I might
> > have forgotten something minor)
>
> I'm aware o
ever enough to keep |
`\up.” —Jane Wagner, via Lily Tomlin |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
iarism rules.
--
\ “It is well to remember that the entire universe, with one |
`\ trifling exception, is composed of others.” —John Andrew Holmes |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
le’
library https://pypi.python.org/pypi/lockfile/> which is commonly
used with ‘python-daemon’.
--
\ “Pinky, are you pondering what I'm pondering?” “I think so, |
`\Brain, but if we give peas a chance, won't the lima beans feel |
_o__)left out?
bert |
_o__)Einstein, unsent letter, 1955 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
I just can't get started until |
`\ I've had that first, piping hot pot of coffee. Oh, I've tried |
_o__)other enemas...” —Emo Philips |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
\ for granted … but to weigh and consider.” —Francis Bacon |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
|
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
s it is an attractive but inappropriate tool. You
may need to construct a more specific parser for your needs. Even if
it's possible with regex, the resulting pattern may be so complex that
it's better to write it out more explicitly.
--
\ “To punish me for my contempt of aut
Woodcock |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
pecific operation is occupying too much time. Write
the code correct and readable first, before trying to optimise what you
don't need to yet.
--
\ “Value your freedom or you will lose it, teaches history. |
`\ “Don't bother us with politics,” respond those who don'
All my life I've had one dream: to achieve my many goals.” |
`\ —Homer, _The Simpsons_ |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ohn Kenneth Galbraith, 1989-07-28 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Roy Smith writes:
> Ben Finney wrote:
>
> > Makes sense, since ‘datetime’ can do everything ‘date’ can do, and
> > is conceptually a subset of the same concept.
>
> That's reasonable, but given that, it's weird that date(2014, 1, 23) ==
> datetime(2014,
ey're exactly like the old ones.” —Charles F. Kettering |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
races anyone who would claim it.” —Sam Harris, _The End of |
_o__) Faith_, 2004 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
does not have this command; you may want to use a better mail
client which implements this feature.
--
\ “I must say that I find television very educational. The minute |
`\ somebody turns it on, I go to the library and read a book.” |
_o__)
ust take precedence over public relations, for nature |
`\ cannot be fooled.” —Richard P. Feynman |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
2014, 1, 29, 22, 35, 7, 900526, tzinfo=)
>>> now.astimezone(LOCAL_TZ)
datetime.datetime(2014, 1, 29, 16, 35, 7, 900526, tzinfo=)
--
\ “We tend to scoff at the beliefs of the ancients. But we can't |
`\scoff at them personally, to their faces, and this is what |
_o__) annoys me.” —Jack Handey |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
\ his fellow-men is dishonest and infamous.” —Robert G. |
_o__) Ingersoll, _The Liberty of Man, Woman and Child_, 1877 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
should-go>.
--
\ “My, your, his, hers, ours, theirs, its. I'm, you're, he's, |
`\ she's, we're, they're, it's.” —anonymous, alt.sysadmin.recovery |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ed (I'm not
convinced it is needed), it should have that same behaviour.
--
\ “I tell you the truth: this generation will certainly not pass |
`\ away until all these things [the end of the world] have |
_o__) happened.” —Jesus Christ, c. 30 CE, as quoted in Matthew
Ben Finney writes:
> Time zones are a hairy beast to manage, made all the more difficult
> because national politicians continually fiddle with them which means
> they can't just be a built-in part of the Python standard library.
PyCon 2013 had a good talk on calendaring and t
Steven D'Aprano writes:
> On Fri, 31 Jan 2014 11:35:14 +1100, Ben Finney wrote:
>
> > Cameron Simpson writes:
> >> Firstly, replace is a verb, and I would normally read
> >> td.replace(microseconds=0) as an instruction to modify td in place.
> >>
in arms is not spending money alone. It is spending |
`\ the sweat of its laborers, the genius of its scientists, the |
_o__) hopes of its children.” —Dwight Eisenhower, 1953-04-16 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Python warn that it's not 100% perfect? Are people |
`\ just supposed to “know” this, magically?” —Mitya Sirenef, |
_o__) comp.lang.python, 2012-12-27 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ned Batchelder writes:
> On 1/31/14 6:05 PM, Ben Finney wrote:
> > Here we disagree. I think the meaning “… and that returns the new
> > instance” is entailed in the meaning of “constructor”.
> > […]
>
> You say these terms already have meanings, and that construc
Ethan Furman writes:
> On 01/31/2014 03:47 PM, Ben Finney wrote:
> > I suggest:
> >
> > Called automatically by the constructor “__new__” during
> > instance creation, to initialise the new instance.
>
> But __new__ does not call __init__, type does [1]
Ben Finney writes:
> My apologies, you're right and that's made clear at
> .
And that's a URL to my local filesystem.
Clearly it's time for me to step away from the discussion for a while
:-)
--
\ “I went to the cinema, it said ‘Adults: $5.00, Children $2.50’.
cs should (somehow) say
that clearly.
--
\ “He may look like an idiot and talk like an idiot but don't let |
`\ that fool you. He really is an idiot.” —Groucho Marx |
_o__) |
Ben Finney
--
https://mail.pyth
\ “If nature has made any one thing less susceptible than all |
`\others of exclusive property, it is the action of the thinking |
_o__) power called an idea” —Thomas Jefferson |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
” —Ogden Nash |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
” —Hal Abelson |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
leave politics alone, but politics won't leave you alone.” |
_o__)—Richard Stallman, 2002-07-26 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
t; is the
place to look for official explanations of language features.
--
\ “I met my girlfriend in Macy's; she was buying clothes, and I |
`\ was putting Slinkies on the escalators.” —Steven Wright |
_o__)
s Henry Huxley, _Essays on |
_o__) Controversial Questions_, 1889 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
an expiration date.” —Steven Wright |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
empt for the law.” —Justice Louis Brandeis |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
circle of compassion to embrace all humanity and the whole |
_o__) of nature in its beauty.” —Albert Einstein |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ian Kelly writes:
> On Wed, Nov 25, 2015 at 5:52 PM, Random832 wrote:
> > On 2015-11-25, Ben Finney wrote:
> >> That is, the ‘2’ in ‘cartesian_point = (2, 3)’ means something
> >> different than in ‘cartesian_point = (3, 2)’.
> >>
> >> Whereas th
that's even remotely true!” —Homer, _The Simpsons_ |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
statement or belief manifestly inconsistent |
`\with one's own opinion.” —Ambrose Bierce, _The Devil's |
_o__)Dictionary_, 1906 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ition, in which case your original
statement was as ambiguous as this most recent one you wrote; or you do
hold that position, and my response stands.
--
\ “When I was little, my grandfather used to make me stand in a |
`\ closet for five minutes without moving. He said it was elevator |
_
`\ to do unto you. (The twenty-five percent is [to correct] for |
_o__)error.)” —Linus Pauling's Golden Rule |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> On Fri, 27 Nov 2015 12:40 pm, Ben Finney wrote:
>
> > It's still not been expressed what “fake” refers to here. Or, rather,
> > what “real” thing was being expected, and how these don't qualify.
>
> They are faked in the sense
python, 2012-12-27 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
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
mation, I change my position. What, sir, |
`\ do you do with new information?” —John Maynard Keynes |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
bvious* way to do it. As you
say, ‘print’ is that one obvious way for emitting simple text output.
--
\ “What's another word for Thesaurus?” —Steven Wright |
`\ |
_o__)
main(sys.argv)
sys.exit(exit_status)
--
\“The greatest tragedy in mankind's entire history may be the |
`\ hijacking of morality by religion.” —Arthur C. Clarke, 1991 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Cameron Simpson writes:
> First, as Ben remarks, if one test _depends_ on an earlier one then it
> isn't a real unit test.
>
> On the other hand, if you simply have some simple tests followed by
> more complex tests (I have several like this) you have two facilities
> to h
, not use it within Python.
But I can only guess, until you show us which page from which tutorial
you're referring to.
--
\“Technology is neither good nor bad; nor is it neutral.” |
`\ —Melvin Kranzberg's First Law of Technology |
_o__)
*any* flow-control statement in an exception-handler's
‘finally’ clause.
--
\ “We can't depend for the long run on distinguishing one |
`\ bitstream from another in order to figure out which rules |
_o__) apply.” —Eben Moglen, _Anarchism Triumphant_, 1999 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
\ The pessimist fears it is true.” —J. Robert Oppenheimer |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
m pondering?” “I think so, |
`\ Brain, but there's still a bug stuck in here from last time.” |
_o__) —_Pinky and The Brain_ |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
give up education.” —William Jennings Bryan, 1923-01 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ed”, and I can tell |
`\you I did not have C++ in mind.” —Alan Kay, creator of |
_o__)Smalltalk, at OOPSLA 1997 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
re is on those who can fix that error. Let's not overload the
Subject field to make up the lack.
--
\ “Self-respect: The secure feeling that no one, as yet, is |
`\suspicious.” —Henry L. Mencken |
_o__)
as in mind.” —Noam Chomsky |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Shelley, _The Necessity of Atheism_, 1811 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ming, and assume good faith in
newcomers.
--
\ “Do unto others twenty-five percent better than you expect them |
`\ to do unto you. (The twenty-five percent is [to correct] for |
_o__) error.)” —Linus Pauling's Golden Rule |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
rary byte stream – already opened, such as a
‘Popen.stdout’ attribute – in a text wrapper with a particular encoding?
--
\“With Lisp or Forth, a master programmer has unlimited power |
`\ and expressiveness. With Python, even a regular guy can reach |
_o__) for the stars.” —Raymond Hettinger |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
I left the Subject field with the wrong question. The immediate answer
is “it presents the ‘file’ interface”. The consequent questions remain:
Ben Finney writes:
> $ python2
[…]
> >>> gnupg_stdout = io.TextIOWrapper(gnupg_subprocess.stdout)
> Traceback (mos
eryk sun writes:
> On Wed, Dec 23, 2015 at 7:36 PM, Ben Finney
> wrote:
> > So how do I get from a Python 2 ‘file’ object, to whatever
> > ‘io.TextIOWrapper’ wants?
>
> I would dup the file descriptor and close the original file. Then open
> the file descriptor using
::
for item in (x for x in cfg if x != canvas):
print item
https://docs.python.org/3/reference/expressions.html#generator-expressions>
You will learn about these by working through the Python tutorial, from
beginning to end https://docs.python.org/3/tutorial/>. Don't skip
anything, and experiment with each example to understand it before
continuing.
--
\ “Anyone 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
ormation |
`\ technology as a McDonalds Certified Food Specialist is to the |
_o__) culinary arts.” —Michael Bacarella |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
jf...@ms4.hinet.net writes:
> Thank you, Ben. It's amazing that you seem to know every piece of
> Python information hiding in the web:-)
You're welcome, I'm glad to help. As for the “hiding”, the answer is in
the Python documentation itself.
> see this question listed i
—hotel room, Japan |
`\ |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
answers.
--
\ “When cryptography is outlawed, bayl bhgynjf jvyy unir |
`\ cevinpl.” —Anonymous |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
thon libraries you can use for accessing
that interface.
--
\ “If you do not trust the source do not use this program.” |
`\—Microsoft Vista security dialogue |
_o__) |
Ben Finney
--
h
|
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
beginner discussions to the ‘tutor’
https://mail.python.org/mailman/listinfo/tutor> forum.
--
\ “All progress has resulted from people who took unpopular |
`\ positions.” —Adlai Stevenson |
_o__)
of Faith_, 2004 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
nt. You'll need to do some remedial learning of Python, and I
recommend working through the Python tutorial.
--
\“But it is permissible to make a judgment after you have |
`\examined the evidence. In some circles it is even encouraged.” |
_o__) —Carl
Steven D'Aprano writes:
> On Thu, 31 Dec 2015 10:13 am, Ben Finney wrote:
>
> > You may be familiar with other languages where the distinction
> > between “attribute of an object” is not distinct from “item in a
> > dictionary”. Python is not one of those languages
w Don't Repeat Yourself in code that needs
a lot of validation of inputs.
--
\ “It's my belief we developed language because of our deep inner |
`\ need to complain.” —Jane Wagner, via Lily Tomlin |
_o__)
ception. Is that your intent?
--
\ “I don't want to live peacefully with difficult realities, and |
`\ I see no virtue in savoring excuses for avoiding a search for |
_o__)real answers.” —Paul Z. Myers, 2009-09-12 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
"Charles T. Smith" writes:
> On Thu, 31 Dec 2015 11:21:59 +1100, Ben Finney wrote:
>
> > Tersely: the relationship between an object and its attributes, is
> > not the same as the relationship between a dictionary and its items.
>
> I understand this to me
Given how very often such decisions make my debugging tasks needlessly
difficult, I'm not seeing how that's a desirable feature.
--
\ “Firmness in decision is often merely a form of stupidity. It |
`\indicates an inability to think the same thing out twice.” |
_o__)
support ends.
I tell them I can't say, because I don't have 2020 vision.
--
\ “Science shows that belief in God is not only obsolete. It is |
`\also incoherent.” —Victor J. Stenger, 2001 |
_o__)
Chris Angelico writes:
> On Fri, Jan 1, 2016 at 7:18 AM, Ben Finney wrote:
> > Given how very often such decisions make my debugging tasks
> > needlessly difficult, I'm not seeing how that's a desirable feature.
>
> What Steven's actually advocating is re
on a level
playing field not only technically, but socially?
--
\ “Ours is a world where people don't know what they want and are |
`\ willing to go through hell to get it.” —Donald Robert Perry |
_o__) Marquis |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ing to accord to |
`\ his fellow-men is dishonest and infamous.” —Robert G. |
_o__) Ingersoll, _The Liberty of Man, Woman and Child_, 1877 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
a polite reminder to
do that, and an attempt to get you to do so if you didn't.
If you didn't, then answering “yes” is wasting everyone's time.
--
\ “As the most participatory form of mass speech yet developed, |
`\ the Internet deserves the highest protection from governme
Michael Torrie writes:
> On 01/02/2016 12:02 AM, Ben Finney wrote:
> > GitHub's “pull request” workflow is entirely proprietary and can
> > only be done within GitHub.
>
> Really? This seems like an entirely artificial github requirement.
Yes, it is.
> There'
here's no excuse to be bored. Sad, yes. Angry, yes. |
`\Depressed, yes. Crazy, yes. But there's no excuse for boredom, |
_o__) ever.” —Viggo Mortensen |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
foolish for a community to
willingly put their correspondence data into it.
--
\ “Come on Milhouse, there’s no such thing as a soul! It’s just |
`\ something they made up to scare kids, like the Boogie Man or |
_o__) Michael Jackson.” —Bart, _The Simpson
Chris Angelico writes:
> On Sun, Jan 3, 2016 at 7:45 PM, Ben Finney wrote:
> > Anyone can take email data from the email server, migrate it to a
> > different implementation of the same email system, keep it running
> > with the same data and allow the same people to
ng ten
0/1 elements. Thus the map(sum, ...) call does have an array or array
to work with.
[Not being a Python expect I've probably got some of the terminology
wrong but I hope the gist of it clear.]
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
rence between a moral man and a man of honor is that |
`\ the latter regrets a discreditable act, even when it has worked |
_o__) and he has not been caught.” —Henry L. Mencken |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
what you expect?
--
\“Of course, everybody says they're for peace. Hitler was for |
`\ peace. Everybody is for peace. The question is: what kind of |
_o__)peace?” —Noam Chomsky, 1984-05-14 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Robert writes:
> On Monday, January 4, 2016 at 9:26:47 PM UTC-5, Ben Finney wrote:
> > Can you show example code that you would expect, and specifically what about
> > the actual code doesn't match what you expect?
>
> Excuse me for the incomplete info previously.
>
advice. So I
advise you don't make such a restrictive work.
--
\ “The way to build large Python applications is to componentize |
`\ and loosely-couple the hell out of everything.” —Aahz |
_o__) |
Ben F
only one issue at a time.” —Brian W. |
`\Kernighan and Dennis M. Ritchie, _The C programming language_, |
_o__) 1988 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
and consuming them. Learning to use them is an
important tool in avoiding more complex and error-prone code.
--
\ “[F]reedom of speech does not entail freedom to have your ideas |
`\accepted by governments and incorporated into law and policy.” |
_o__) —Russell Blackford, 2010-03-06 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
on.org/3/reference/expressions.html#binary-arithmetic-operations>.
--
\ “Timid men prefer the calm of despotism to the boisterous sea |
`\of liberty.” —Thomas Jefferson |
_o__) |
Ben Finney
--
ht
1401 - 1500 of 5102 matches
Mail list logo