s around for |
`\ a coffin." -- Henry L. Mencken |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
e might, if they screamed all the time, for no good |
_o__) reason." -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
told a chicken to cross the road. It said, 'What |
`\ for?'" -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
or double-check you built and installed the source packages
the way you want them.
--
\"My doctor told me to stop having intimate dinners for four. |
`\Unless there are three other people." -- Orson Welles |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
t a mistake; he's
saying that it's difficult to get into a situation where that is the
cause of one's mistake.
--
\ "I got an answering machine for my phone. Now when someone |
`\ calls me up and I'm not home, they get a recording of a busy |
_o__) signal." -- Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ternet." -- Al Gore |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ng to be |
`\ frank." Ned Seagoon: "Right, I'll be Tom." Count Moriarty: |
_o__) "I'll be Gladys." *slap* -- The Goon Show, _World War I_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ies ridiculous!' And God granted it." -- |
_o__) Voltaire |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
NameError: name 'some_empty_module' is not defined
Can you post a minimal, complete example that shows the behaviour?
--
\ "As we enjoy great advantages from the inventions of others, we |
`\ should be glad to serve others by any invention of ours." -- |
_o__)
, how can the instance be created
properly?
--
\ "It's easy 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
--
http://mail.python.org/mailman/listinfo/python-list
lt.
Conclusion: Thus, using tabs-only is inferior to using spaces-only for
indentation, because it violates the Principle of Least Astonishment
http://en.wikipedia.org/wiki/Principle_of_least_astonishment>.
--
\ "I object to doing things that computers can do." —Olin |
`\
tical
fully-controlled isolated environments is foolish, to say the least.
--
\ "If you can't beat them, arrange to have them beaten." -- |
`\ George Carlin |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Mon, 31 Dec 2007 12:36:11 +1100, Ben Finney wrote:
>
> > Steven D'Aprano <[EMAIL PROTECTED]> writes:
> >
> >> On Sun, 30 Dec 2007 20:41:09 +, Thorsten Kampe wrote:
> >>
> >>
o!")
Why isn't this standardised? Because the process-call interface is
inconsistent between operating systems, and there's even less
consistency in the implementations of the programs that return these
values.
The Zen of Python says: "In the face of ambiguity, refuse the
temptati
"I hate it when my foot falls asleep during the day, because |
`\ that means it's gonna be up all night." -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Wed, 02 Jan 2008 15:17:54 +1100, Ben Finney wrote:
>
> > Torsten Bronger <[EMAIL PROTECTED]> writes:
> >
> >> [...] the width of a tab is nowhere defined. It really is a matter of
> >> t
So there's no sense in defining class D to inherit from both A *and*
B. To get a descendent of both those classes, inheriting from B is
sufficient. It should rather be::
class D(B): pass
--
\ "Pinky, are you pondering what I'm pondering?" "Uh, I think so, |
`\ Brain, but we'll never get a monkey to use dental floss." -- |
_o__)_Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ellectuals to tell the truth |
`\and expose lies." -- Noam Chomsky |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
e that would be flagged as invalid
by HTML validator tools.
--
\ "Those who write software only for pay should go hurt some |
`\ other field." -- Erik Naggum, in _gnu.misc.discuss_ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
f to a single subject """
pass
for this_subject in all_subjects:
do_the_stuff(this_subject)
--
\ "Unix is an operating system, OS/2 is half an operating system, |
`\ Windows is a shell, and DOS is a boot partition virus." |
_o__)
people not as smart as them." -- Paul Graham |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
e all its contents." -- Howard |
_o__) Philips Lovecraft |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
trade was to the 16th." -- David Mertz |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
orced from that point on for all files edited.
--
\ "In the long run, the utility of all non-Free software |
`\ approaches zero. All non-Free software is a dead end." —Mark |
_o__) Pilgrim |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ing any of the actual statements in
the program) a significant part of the total time in this case?
--
\ "In the long run, the utility of all non-Free software |
`\ approaches zero. All non-Free software is a dead end." —Mark |
_o__)
|
`\ Lily Tomlin |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
conventions.
--
\ "It is forbidden to steal hotel towels. Please if you are not |
`\person to do such is please not to read notice." -- Hotel |
_o__) sign, Kowloon, Hong Kong |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
the warning off because catching unused
> variables in the general is useful to me.
Agreed.
--
\ "Dyslexia means never having to say that you're ysror." |
`\—anonymous |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
eps/pep-0328.html> and implemented in
Python 2.5 http://docs.python.org/whatsnew/pep-328.html>.
--
\ "The way to build large Python applications is to componentize |
`\ and loosely-couple the hell out of everything." -- Aahz |
_o__)
trying to make
water not wet.
--
\ "The shortest distance between two points is under |
`\ construction." -- Noelie Alito |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> writes:
> On Sat, 12 Jan 2008 09:47:26 +1100, Ben Finney wrote:
>
> > Trying to make bits uncopyable and unmodifiable is like trying to
> > make water not wet.
>
> Certainly not. I can put water into the fre
hird edition has benefited
from his many years of experience finding effective ways to teach the
language.
--
\ "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 s
tends to remain on vacation |
`\ unless acted upon by an outside force." -- Carol Reichel |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ew__' method returns that instance back to the caller.
--
\ "Probably the toughest time in anyone's life is when you have |
`\ to murder a loved one because they're the devil." -- Emo |
_o__) Philips |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
re, he's, |
`\ she's, we're, they're, it's." —anonymous, |
_o__)alt.sysadmin.recovery |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
d* good for you,
since you *can* drop them if it's to your advantage to do so.
--
\ "Everything is futile." -- Marvin of Borg |
`\ |
_o__)
|
`\ exert myself in order to give in the same measure as I have |
_o__)received and am still receiving" —Albert Einstein |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
or.
I think it's desirable to keep them both distinct as is.
--
\ "If you get invited to your first orgy, don't just show up |
`\ nude. That's a common mistake. You have to let nudity |
_o__) 'happen.'
ease give an overview of the major user-visible changes?
That will help in convincing people to upgrade.
--
\"Most people don't realize that large pieces of coral, which |
`\ have been painted brown and attached to the skull by common |
_o__) wood screws, can make a child
skimming the main headings :-)
--
\ "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
319 U.S. 624 (1943) |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
|
`\ available." -- Stan Kelly-Bootle |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney <[EMAIL PROTECTED]> writes:
> I think of NotImplemented as equivalent to None
Not "equivalent"; rather "comparable in usage".
--
\ "[W]e are still the first generation of users, and for all that |
`\ we may have invented the net, we s
t the source do not use this program." |
`\ —Microsoft Vista security dialogue |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
grackle <[EMAIL PROTECTED]> writes:
> On Jan 14, 6:28 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
> > Release your package as free software on the Cheeseshop
> > http://cheeseshop.python.org/>. If the name you want is
> > already taken, pick one that will he
George Sakkis <[EMAIL PROTECTED]> writes:
> On Jan 14, 5:39 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
>
> > I think of NotImplemented as equivalent to None; it's useful as a
> > sentinel value to set an attribute to in (e.g.) an abstract class.
>
Hrvoje Niksic <[EMAIL PROTECTED]> writes:
> Ben Finney <[EMAIL PROTECTED]> writes:
>
> > Hrvoje Niksic <[EMAIL PROTECTED]> writes:
> >> __init__ *is* the closest equivalent to what other languages
> >> would call a constructor.
> >
> >
t becomes a candidate for garbage collection. And so on.
--
\ "I planted some bird seed. A bird came up. Now I don't know |
`\ what to feed it." -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Christian Heimes <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > The term "reference" is fine, since that's exactly how it works.
> > One gets at an object via some reference, be it a name or some
> > access into a container object. When an objec
main difference is in what namespace the module's
objects are made available.
--
\ "The way to build large Python applications is to componentize |
`\ and loosely-couple the hell out of everything." -- Aahz |
_o__)
Tobiah <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > Tobiah <[EMAIL PROTECTED]> writes:
> >
> >> This is a little surprising. So "from mod import *" really copies
> >> all of the scalars into new variables in the local namespace.
>
can ever hope to get for participation in most threads here.
--
\ "Remember: every member of your 'target audience' also owns a |
`\broadcasting station. These 'targets' can shoot back." -- |
_o__) Michael Rathbun to advertisers, news.a
d, bayl bhgynjf jvyy unir |
`\ cevinpl." -- Anonymous |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Fri, 18 Jan 2008 15:05:23 +1100, Ben Finney wrote:
> > In Python, 'list' is a basic built-in type. Python has no 'array'
> > type [...]
> Did you forget the array module?
Yes.
--
\"
uot;If it ain't bust don't fix it is a very sound principle and |
`\ remains so despite the fact that I have slavishly ignored it |
_o__) all my life." —Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ufficient, condition |
`\ for democracy." —Carl Sagan |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ft Vista security dialogue |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Pablo Ziliani <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > This has a very bad code smell (...)
> >
> > \ `\ _o__) Ben Finney
>
> That is forcefulness.
> (sorry, couldn't resist)
I suspect that's a comment on my online nickname, "big
have to be
compromised, or dropped completely.
--
\ "Holy hole in a donut, Batman!" -- Robin |
`\ |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
be sent to the |
`\ frontiers to be destroyed: when the object is to preserve them, |
_o__) it is no longer so." -- Voltaire, _Dictionnaire Philosophique_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
a precise mapping between characters and bytes. It's almost certainly
not aware of "words", only character-to-byte mappings.
--
\ "When I get new information, I change my position. What, sir, |
`\ do you do with new information?" -- John Maynard Keynes |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney <[EMAIL PROTECTED]> writes:
> glacier <[EMAIL PROTECTED]> writes:
>
> > I use chinese charactors as an example here.
> >
> > >>>s1='你好吗'
> > >>>repr(s1)
> > "'\\xc4\\xe3\\xba\\xc3\\xc2\\xf0'&
tography] is the right to speak |
`\ Navajo." -- Eben Moglen |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
cted upon by an outside force." -- Carol Reichel |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks <[EMAIL PROTECTED]> writes:
> On Jan 25, 6:45 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
> > "Gabriel Genellina" <[EMAIL PROTECTED]> writes:
> > > You can also put, in animal/__init__.py:
> > > from monkey import Monkey
>
gt; pass
-1.
That leading dot is too easy to miss when looking over the code.
--
\"Intellectual property is to the 21st century what the slave |
`\ trade was to the 16th." —David Mertz |
_o__)
waiting. Now I can wait an hour in |
`\ only ten minutes." -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
File "", line 1, in ?
AttributeError: 'Foo' object has no attribute 'eggs'
>>> foo.beans
'other beans'
--
\ "If consumers even know there'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
"We spend the first twelve months of our children's lives |
`\ teaching them to walk and talk and the next twelve years |
_o__) telling them to sit down and shut up." -- Phyllis Diller |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
e, and preferably only one, obvious way to do it::
>>> del foo.hair
--
\ "A man's only as old as the woman he feels." -- Groucho Marx |
`\ |
_o__)
response of the internet will re-introduce us |
`\to that from which our political systems have separated us for |
_o__) so long, the consequences of our own actions." -- Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
;Philosophy is questions that may never be answered. Religion |
`\ is answers that may never be questioned." —anonymous |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
--
\ "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
--
http://mail.python.org/mailman/listinfo/python-list
calcat.net/cgi-bin/log/2003/09/02>
As for "write Python like a Python programmer", this:
Code Like a Pythonista: Idiomatic Python
http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html>
--
\ "I bought a self learning record to learn Spanish. I turne
assion to embrace all humanity and the whole |
_o__) of nature in its beauty." —Albert Einstein |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
the start of
the document http://www.w3.org/TR/xml/#sec-prolog-dtd>. Many XML
parsers will (correctly) reject such a document.
> doc = """\
>
This is fine.
--
\ "True greatness is measured by how much freedom you give to |
`\ others, not by ho
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Fri, 01 Feb 2008 00:40:01 +1100, Ben Finney wrote:
>
> > Quite apart from a human thinking it's pretty or not pretty, it's *not
> > valid XML* if the XML declaration isn't immediately at the start of th
ing 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
ave a large seashell collection, which I keep scattered on |
`\ the beaches all over the world. Maybe you've seen it." |
_o__) —Steven Wright |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
//wiki.python.org/moin/Py3kDeprecated#head-343618ffa0887790ed12c3f9cf278cd7ca7eef51-2>
--
\ "Prediction is very difficult, especially of the future." |
`\ —Niels Bohr |
_o__)
onalism has no place in art, and hacking is art. |
`\ Software Engineering might be science; but that's not what I |
_o__) do. I'm a hacker, not an engineer." —Jamie W. Zawinski |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
"Ignorance more frequently begets confidence than does |
`\ knowledge." —Charles Darwin |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney <[EMAIL PROTECTED]> writes:
> Robert Kern <[EMAIL PROTECTED]> writes:
>
> > And if you want to really blow your mind,
> >
> > print isinstance(type, object) # True
> > print isinstance(object, type) # True
>
> Not what I see here.
arbitrary user input; the input isn't executed, merely parsed (as
JSON) to create a data object.
--
\ “I busted a mirror and got seven years bad luck, but my lawyer |
`\ thinks he can get me five.” —Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
'spam'], ['spam'], ['spam'],
['spam']], [['spam'], ['spam'], ['spam'], ['spam'], ['spam']], [['spam'],
['spam'], ['spam'], ['spam'], ['spam']]]
As made
ot;Never use a long word when there's a commensurate diminutive |
`\available." —Stan Kelly-Bootle |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
my code as though that's the case :-)
--
\ “The man who is denied the opportunity of taking decisions of |
`\ importance begins to regard as important the decisions he is |
_o__)allowed to take.” —C. Northcote Parkinson |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
or end, and it's hard to keep track of what |
_o__) you've already covered." —Anonymous |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
out, it was gone." -- Steven Wright |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
"Python just
does whatever the underlying hardware does with floating-point
numbers". If that's the rule, it shouldn't be broken in the special
case of division by zero.
--
\ “If the desire to kill and the opportunity to kill came always |
`\ together, who would
, |
`\ she's, we're, they're, it's." -- Anonymous, |
_o__) alt.sysadmin.recovery |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
andard library
module 'string'; but that the code you have binds that name to some
other module.
--
\ "War is God's way of teaching geography to Americans." -- |
`\ Ambrose Bierce |
_o__) |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
^
SyntaxError: invalid syntax
So, it's not that parens are "used for generator literals". It's that
parens can be used to make grouping explicit where the syntax would
otherwise be ambiguous.
--
\ "If you're a horse, and someone gets on you, and falls o
-- Justice Louis |
_o__) Brandeis |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> Ben Finney:
> > Generator literals do not require the parens at all. However, the
> > syntax of where the generator literal *appears* can make it
> > necessary to explicitly group the expression using parens.
>
> Have you taken a look at
George Sakkis <[EMAIL PROTECTED]> writes:
> On Feb 12, 7:02 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
> > That makes it even more a violation of
> > principle-of-least-astonishment that the '(foo)' form doesn't give
> > a one-element tuple lite
Steve Holden <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> [...]
> >
> > Note that '()' is syntactically null. Parentheses don't declare a
> > tuple literal, commas do. Parentheses are for grouping within
> > expressions, not specifying type
the harm done by trying to
change it would be more than the harm done by leaving it in.
--
\ “[W]e are still the first generation of users, and for all that |
`\ we may have invented the net, we still don’t really get it.” |
_o__) —Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
ell.
--
\ “I cannot conceive that anybody will require multiplications at |
`\the rate of 40,000 or even 4,000 per hour …” —F. H. Wales, |
_o__) 1936 |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
l.
--
\ “Unix is an operating system, OS/2 is half an operating system, |
`\ Windows is a shell, and DOS is a boot partition virus.” |
_o__) —Peter H. Coffin |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list
2801 - 2900 of 4138 matches
Mail list logo