O. Wilson, |
_o__) _Consilience_, 1998 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
“If we don't believe in freedom of expression for people we |
`\ despise, we don't believe in it at all.” —Noam Chomsky, |
_o__) 1992-11-25 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> On Tue, 07 Jun 2011 10:11:01 +1000, Ben Finney wrote:
>
> > I tend to use ‘u"foo {bar} baz".format(**vars())’, since ‘vars’ can
> > also take the namespace of an object. I only need to remember one
> > “give me the namespace” f
use to be bored. Sad, yes. Angry, yes. |
`\Depressed, yes. Crazy, yes. But there's no excuse for boredom, |
_o__) ever.” —Viggo Mortensen |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
efs about science or |
_o__) history […].” —Sam Harris, _The End of Faith_, 2004 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
|
`\your users' lives and creating something practical is much |
_o__) harder.” —Ryan Singer, 2008-07-09 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
holders, and your legal
advisor, for the rest of your question.
--
\ “The cost of a thing is the amount of what I call life which is |
`\ required to be exchanged for it, immediately or in the long |
_o__) run.” —Henry David Thoreau |
Ben Finney
--
Steven D'Aprano writes:
> On Thu, 09 Jun 2011 17:44:32 +1000, Ben Finney wrote:
>
> > Eric Snow writes:
> >
> >> AttributeError: attribute '__doc__' of 'type' objects is not writable
> >>
> >> That is on 3.3.
> >
>
Sérgio Monteiro Basto writes:
> Ben Finney wrote:
>
> > In this case your shell has no preference for the encoding (since
> > you're redirecting output to a file).
>
> How I say to python that I want that write in utf-8 to files ?
You already did:
> > In th
d |
`\ the human shield of their believers' feelings.” —Richard |
_o__) Stallman |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
o override the docstring.
--
\ “When we pray to God we must be seeking nothing — nothing.” |
`\ —Saint Francis of Assisi |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
t known unless you specify it.
--
\ “Reality must take precedence over public relations, for nature |
`\cannot be fooled.” —Richard P. Feynman |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
g will be insufficient (as in your ABC example) or
> wrong.
I hope the above demonstrates that your assertion is untrue. Every
single method on a class doesn't need to specify the full context; a
docstring that requires the reader to know what class the method belongs
to is fine.
--
\ “In any great organization it is far, far safer to be wrong |
`\ with the majority than to be right alone.” —John Kenneth |
_o__)Galbraith, 1989-07-28 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> class Square(Shape):
> """ An equal-sided quadrilateral polygon. """
That this docstring is imprecise (it describes any rhombus, not
necessarily a square) is something I hope no-one else notices or draws
attention to.
Oh, darn.
--
should they care about it?” —Thomas Hesse, Sony BMG, 2006 |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
the tutorial, understand the data model, and
work with it to get better results.
--
\ “Give a man a fish, and you'll feed him for a day; give him a |
`\religion, and he'll starve to death while praying for a fish.” |
_o__)
s mystify me that otherwise intelligent people take |
_o__)it seriously.” —Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
st thought was http://bash.org/?5804>.
--
\ “In case of fire, do your utmost to alarm the porter.” —hotel, |
`\Vienna |
_o__) |
Ben Finney
--
http://mail.python.org
the *end*.
So you'll probably need to be more specific about why your use case
differs from that.
--
\ “Pinky, are you pondering what I'm pondering?” “I think so, |
`\Brain, but if the plural of mouse is mice, wouldn't the plural |
_o__) of spouse be spice?” —_Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Equipment Corp., 1977 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
e a new message.
Hope that helps!
--
\ “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
--
http://mail.python.org/mailman/listinfo/python-list
g Formatting
Operations in new code.”
http://docs.python.org/library/stdtypes.html#str.format>
--
\“Room service? Send up a larger room.” —Groucho Marx |
`\ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
our
example).
--
\ “Instead of a trap door, what about a trap window? The guy |
`\ 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
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Tue, Jun 21, 2011 at 10:39 AM, Ben Finney
> wrote:
> > Instead, Python has objects, and references to those objects so you
> > can get at them. The Python documentation, much to my frustration,
> > calls these references “variables” even t
e Kierkegaard (1813–1855) |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
other, which can then raise any exception.
> >>> os.kill.__exceptions__
> (, , 'exceptions.OverflowError'>, )
This is false. Any exception could be raised by any call. Learn to live
with that.
--
\ “Computers are useless. They can only give you answers.” —Pablo |
`\ Picasso |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Tue, Jun 21, 2011 at 12:38 PM, Ben Finney
> wrote:
> > The *binding* is scoped.
>
> And the binding follows the exact same rules as anything else would.
> It has scope and visibility. In terms of the OP, the binding IS like a
> variable.
Yes
e him a |
`\religion, and he'll starve to death while praying for a fish.” |
_o__) —Anonymous |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
emphasis == 'strong' or
highlight > 100):
raise ValueError("sorry, you lose")
--
\ “I'm a great lover, I'll bet.” —Emo Philips |
`\ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> John Yeung writes:
>
> > So last week PEP 8 was updated to reflect this. All fine and good. I
> > happen to prefer this style myself. But there remains an example
> > further down (left over from earlier incarnations of PEP 8) which
> > mig
1153 |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ang.python’ is currently provided from
‘astraweb.com’.
--
\ “I'm a born-again atheist.” —Gore Vidal |
`\ |
_o__) |
Ben Finney
--
htt
asier. I don't see
that putative benefits of constant bindings would be anywhere near as
valuable.
--
\ “I love and treasure individuals as I meet them, I loathe and |
`\ despise the groups they identify with and belong to.” —George |
_o__)
on them. Then I took one out and he ran around |
_o__) in circles.” —Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ith it to understand before proceeding.
--
\ “I call him Governor Bush because that's the only political |
`\ office he's ever held legally.” —George Carlin, 2008 |
_o__) |
Ben Finney
--
http://mail
"Waldek M." writes:
> Dnia Thu, 23 Jun 2011 17:22:37 +1000, Ben Finney napisał(a):
> > The ability to re-bind any attribute, even ones which the author
> > thought should be constant, makes writing unit tests much easier. I
> > don't see that putative be
ared to the cost of |
`\ ignorance.” —Thomas Jefferson |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
's a DRM, what it is, and how it |
`\ works, we've already failed.” —Peter Lee, Disney corporation, |
_o__) 2005 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
you guys explain me advantages and disadvantages of using
> each of them
I hope that explains.
--
\ “Men never do evil so completely and cheerfully as when they do |
`\it from religious conviction.” —Blaise Pascal (1623–1662), |
_o__) Pensées, #894. |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
you needed it,
you probably don't in this case.
--
\ “Jealousy: The theory that some other fellow has just as little |
`\ taste.” —Henry L. Mencken |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
"""\
***Chutes and Ladders***
Up to four (4) players may play.
There are 90 spaces on the board.
The player to reach space 90 first wins.
""")
--
\ “Nothing is more sacred than the facts.” —Sam Harris, _The End |
`\
tions for what the code
should do.
--
\ “In general my children refuse to eat anything that hasn't |
`\ danced on television.” —Erma Bombeck |
_o__) |
Ben Finney
--
http://mail.pyth
valuable than readability?
--
\ “Because of the impropriety of entertaining guests of the |
`\opposite sex in the bedroom, it is suggested that the lobby be |
_o__) used for this purpose.” —hotel, Zurich |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
s, eventual theorems...
I'd say facts are claims about reality which have been independently
verified to be true. Beliefs that are about facts are thereby correct or
incorrect.
--
\ “Only the educated are free.” —Epictetus, _Discourses_ |
`\
alternative reality.” —Paul Z. Myers, 2010-10-14 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
mpatibility is a common reason for more than one way to do it
in Python. It's just preferable that all but one of them should be
non-obvious :-)
--
\“The whole area of [treating source code as intellectual |
`\property] is almost assuring a customer that you are not going |
_o__
Ben Finney writes:
> logger.error(
> '{0} could not be stored - {1}'.format(
> (self.preset_file, sys.exc_info()[1]))
>
> I usually prefer to use named placeholders instead of positional, but
> this duplicates your original.
Ah, I see that the OP
It's absolutely not.” —Bill Gates, 1995-10-23 |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
gram.
On a Unix-like system (e.g. GNU+Linux), you could create a ‘cron’ job
entry.
--
\ “The most common way people give up their power is by thinking |
`\ they don't have any.” —Alice Walker |
_o__)
Eric Snow writes:
> On Sat, Jul 9, 2011 at 4:41 PM, Ben Finney wrote:
> > Eric Snow writes:
> >> No other objects have code objects. No other objects in Python have
> >> this special optimization.
> >
> > Yes. The two facts are directly related.
[…]
&
tion, |
`\and you're on the way to the pertinent answer.” —Jacob |
_o__) Boronowski, _The Ascent of Man_, 1976 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
over here, looking through your stuff.” —Jack Handey |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
“I cannot conceive that anybody will require multiplications at |
`\ the rate of 40,000 or even 4,000 per hour …” —F. H. Wales, 1936 |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ing.
>>> def foo():
... ds = "The Larch"
... print ds
...
>>> foo.__doc__
>>>
--
\ “Firmness in decision is often merely a form of stupidity. It |
`\indicates an inability to think the same thing out twice.” |
_o__)—Henry L. Mencken |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
neral-purpose, customisable tools,
with clear standard interfaces that work together well, and are easily
replaceable without losing the benefit of all the others.
--
\ “Are you pondering what I'm pondering?” “Umm, I think so, |
`\Brain, but what if the chicken won't wear the nylons?” —_Pinky |
_o__) and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
eople who like country music, |
_o__)denigrate means ‘put down’.” —Bob Newhart |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Bible is the most potent force for atheism |
`\ever conceived.” —Isaac Asimov |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
u're asking.
Maybe it will be quicker to ask: What is it you want to achieve?
--
\ “Compulsory unification of opinion achieves only the unanimity |
`\of the graveyard.” —Justice Roberts in 319 U.S. 624 (1943) |
_o__)
al. Some are a very great deal more |
`\robust, sophisticated and well supported in logic and argument |
_o__) than others.” —Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ut Marge, what if we chose the wrong religion? Each week we |
`\ just make God madder and madder.” —Homer, _The Simpsons_ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
use newcomers by this.
Agreed; however, it seems reasonable people can disagree on how much
that matters. I think it should be fixed, but not enough to push for it.
--
\ “Leave nothing to chance. Overlook nothing. Combine |
`\ contradictory observations. Allow yourself enough time.” |
_o__) —Hippocrates |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
t is good practice. But you should not compromise polymorphism to
that.
--
\“The whole area of [treating source code as intellectual |
`\property] is almost assuring a customer that you are not going |
_o__) to do any innovation in the future.” —Gary Barnett |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
tions of study capability are clear.
Any code using this implementation of Student knows that, if they want a
student who actually studies, they'd better ask for a more specific
type.
See? We can have overstretched analogies *and* remain within the Liskov
substitution principle.
--
\ Eccles
e.
--
\ “Those are my principles. If you don't like them I have |
`\others.” —Groucho Marx |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
—Jack Handey |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
"and here's a rather long error"
"message blah blah blah")
--
\ “I have one rule to live by: Don't make it worse.” —Hazel |
`\ Woodcock |
_o__)
explicitly.
My suggestion::
def get_and_reset_token(self):
result = self.token
self.token = None
return result
--
\ “I stayed up all night playing poker with tarot cards. I got a |
`\ full house and four people died.” —Steven Wright |
_o_
n facts.” —US Senator Pat Moynihan |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
|
`\death your right to mis-attribute this quote to Voltaire.” |
_o__) —Avram Grumer, rec.arts.sf.written, 2000-05-30 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
people must be really tired.” —Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Frank Millman writes:
> On Jul 24, 10:53 am, Ben Finney wrote:
> > Frank Millman writes:
> > > I know I am flogging a dead horse here, but IMHO, '165', '165.',
> > > '165.0', and '165.00' are all valid string representations
\“Program testing can be a very effective way to show the |
`\presence of bugs, but is hopelessly inadequate for showing |
_o__) their absence.” —Edsger W. Dijkstra |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
\ sized bed. It's red and green and has bells on it, and the ends |
_o__) curl up.” —Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
x27;tcl',
]
It's clear and explicit and really not difficult to type or maintain.
--
\ “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
--
http://mail.python.org/mailman/listinfo/python-list
autiful without |
`\ having to believe that there are fairies at the bottom of it |
_o__) too?” —Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Ethan Furman writes:
> Ben Finney wrote:
> > Ethan Furman writes:
> >> This feels like a violation of 'Special cases aren't special enough
> >> to break the rules.'
> >
> > In the case of ‘bool’, the rule was broken before being introduced.
ht is not free if the profession of |
`\ certain opinions makes it impossible to earn a living.” |
_o__) —Bertrand Russell, _Free Thought and Official Propaganda_, 1928 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Rustom Mody writes:
> Ben Finney said:
> > But this is all getting rather generic and abstract. What specific
> > real-world examples do you have in mind?
>
> regex match vs regex search?
That's not showing a real-world example. Where is the code which is
prone to “lot
space at run-time with ‘textwrap.dedent’
http://stackoverflow.com/questions/2504411/proper-indentation-for-python-multiline-strings/2504454#2504454>.
--
\“Sane people have an appropriate perspective on the relative |
`\ importance of foodstuffs and human beings. Crazy pe
lready taken by any well-known
project (and wish you luck in that search :-)
--
\“Pinky, are you pondering what I'm pondering?” “Wuh, I think |
`\so, Brain, but will they let the Cranberry Duchess stay in the |
_o__) Lincoln Bedroom?” —_Pinky and The Brai
ring what I'm pondering?” “Wuh, I think |
`\ so, Brain, but wouldn't anything lose its flavor on the bedpost |
_o__) overnight?” —_Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
. Now my room is all shiny.” |
`\—Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> Ben Finney wrote:
>
> > They're an accident of the history that led to their implementation,
> > and of the pre-existing parts that they're built from. There doesn't
> > need to be a point to them (though they might be usefu
f mental |
_o__) disturbance.” —John F. Schumaker |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
destroys the |
`\ spirit of society and leads to its intellectual |
_o__) impoverishment.” —Albert Einstein |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
sion
progresses, but darn if it ain't annoying.
--
\ “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
--
http:
Seebs writes:
> On 2011-08-10, Ben Finney wrote:
> > Seebs writes:
> >> On 2011-08-10, Chris Angelico wrote:
> >> > And if we require {} then truly free indentation should be OK too!
> >> > But it wouldn't be Python any more.
>
> >>
Seebs writes:
> On 2011-08-11, Ben Finney wrote:
> > You're welcome to attempt to demonstrate the superiority of some
> > other Python-with-braces, but it will (a) be un-Pythonic, and (b) be
> > unlikely to gain the efforts of people who don't think what you
from further investigation.” —Thomas W. Clark, 2009 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> Ben Finney wrote:
>
> > Likewise, “end of line as end of statement” has caused me and many
> > others problems.
>
> I don't understand this. Can you give an example?
Many times I have split a line expecting that some bracketing
dangerous; |
`\those in philosophy only ridiculous.” —David Hume, _A Treatise |
_o__) of Human Nature_, 1739 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
rse, with one |
`\ trifling exception, is composed of others.” —John Andrew Holmes |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ptional.
--
\ “My business is to teach my aspirations to conform themselves |
`\ to fact, not to try and make facts harmonise with my |
_o__) aspirations.“ —Thomas Henry Huxley, 1860-09-23 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
dows 95 bluescreen error message |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
—Edsger W. Dijkstra |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> What is the process if the OP, or someone to whom the OP delegates
> authority, wants to [contribute their work to the Python
> documentation]?
The answer is partly at http://docs.python.org/documenting/>:
If you’re interested in contributing to Python’s d
is too important to be left |
`\to chance.” —Robert R. Coveyou |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
\ question, but to post the wrong information.” —Aahz |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
rg/pypi/testscenarios/>?
--
\己所不欲、勿施于人。 |
`\(What is undesirable to you, do not do to others.) |
_o__) —孔夫子 Confucius, 551 BCE – 479 BCE |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
telling them to sit down and shut up.” —Phyllis Diller |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
201 - 300 of 4138 matches
Mail list logo