gene tani wrote:
> http://www.rubyquiz.com/quiz24.html
His question was for three-card poker, not normal poker. The ranking of
hands in three-card poker isn't the same as in normal best five-card
poker rankings; for instance, in three-card poker, a straight beats a flush.
--
ll builds),
> like the 'utf-8' codec does, right?
Note that UTF-32 is UCS-4. UCS-32 ("Universial Character Set in 32
octets") wouldn't make much sense.
Not that Python has a UCS-4 encoding available either. I'm really not
sure why.
--
Erik Max Francis && [EMA
owingly ask questions in the wrong places, and then
actually _defend_ their actions after they're politely but firmly
informed how to fix the problem. You're really not making yourself look
any better by continuing this thread ...
--
Erik Max Francis && [EMAIL PROTECT
lready supported.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Democritus may have come from Abdera, but he was no dummy.
-- Carl Sagan
--
http://mail.python.org/mailman/listinfo/python-list
saying that the "enjoy to waste their time
niggling."
He's complaining that people weren't nice to help. But they _were_.
They answered his question politely and to the point. It's _he_ that
turned rude after that.
--
Erik Max Francis && [EMAIL PROTECTED] &am
|
| http://www.catb.org/~esr/faqs/smart-questions.html
Sorry, if you think those are unacceptable tones for responses to
off-topic questions, the real world is going to be something of an
unpleasant shock.
He asked a question. He was told how to get the answer. No one was
rude until _
Neuruss wrote:
> The other zilion persons who were not interested (other than the four I
> mentioned above) silently and peacefully ignored the question on went
> on with their happy lifes.
That's because many of them have killfiled you.
--
Erik Max Francis && [EM
alf wrote:
> Would it be .append()? Does it reallocate te list with each apend?
>
> l=[]
> for i in xrange(n):
> l.append(i)
No, it doesn't. It expands the capacity of the list if necessary.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcy
Rene Pijlman wrote:
> Wikipedia always tells the Absolute Truth, because if it doesn't, we can
> edit it and fix it right away.
Tell that to John Seigenthaler.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37
Thorsten Kampe wrote:
> I think I have a deja-vu... Did someone say "Xah"?!
With a hint of Brandon.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Too much a
Mallor wrote:
> I know I'm coming late to the barbeque. In passing, I ask: do you have
> an objective, impartial perspective on the subject of committing
> crimes? Because libel is a crime.
No, it is a tort.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www
. Is there?
Anyway, it's certainly a tort in all relevant jurisdictions here.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Covenants without the sword are but words.
-- Camden
--
http://mail.python.org/mailman/listinfo/python-list
something factually true is _not_ in and of itself a defense
against a libel suit in the UK.
As for the reverse side of the issue, in jurisdictions where it _is_ a
defense, if one were to accuse him of being a pedophile but couldn't
prove it, that would certainly be an actionable o
libel.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
To perceive is to suffer.
-- Aristotle
--
http://mail.python.org/mailman/listinfo/python-list
rson who he was replying to, i.e., you.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Twenty-four hours a day, three-hundred sixty-five days a year as
Secretary
ibel law is not quite as simple
as the original poster was making it out to be). If you don't wish to
defend your position, that's fine, but pointing fingers is kind of weird
at this stage.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jos
Philippa Cowderoy wrote:
> I'd still appreciate being referred to as "she" rather than "he" though.
Oops, my bad. Never occurred to me after all these years, which is kind
of embarrassing, actually :-).
--
Erik Max Francis && [EMAIL PROTECTED] && h
Tim Daneliuk wrote:
> Nope - this module is not supported under Windows ...
There's at least one Python curses module for Windows:
http://adamv.com/dev/python/curses/
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA &a
[EMAIL PROTECTED] wrote:
> Is there some magic I'm missing here? Wouldn't it actually be better for
> Python to treat 0 as a
> special case here, so that x[-2:0] and x[-2:] generated the same result?
No, since x[-2:0:-1] already has meaning and it isn't what you want
an
matrices whose elements are reals, or something else?
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
My heart is pure as the driven slush.
-- Tallulah Bankhead
--
http://mail.python.org/mailman/listinfo/python-list
nterpreted your "distinct,
different, zeroes" as referring to the elements but not the matrices.
Just a misunderstanding.
Every zero matrix is an additive identity, and there are an infinite
number of them. That's certainly true.
--
Erik Max Francis && [EMAIL PROTECTED]
able
>
>
> row= [('name', 'x1'), ('min', 15.449041129349528), ('max',
> 991.6337818245629), ('range', 976.18474069521335), ('mean',
> 496.82174193958127), ('stddev', 304.78275004920454), ('variance
i] = ...
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Every human being is a problem in search of a solution.
-- Ashley Montagu
--
http://mail.python.org/mailman/listinfo/python-list
.
You mean::
class A:
_var1 = 0
...
def func1(self):
A._var1 = 1
All you're doing in your example is setting a local variable inside the
func1 method, which has no effect.
--
Erik Max Francis && [EMAIL PROTECTED] &&a
>
> def func1(self):
> self._var1 = 1
Note this only changes the attribute in the instance. If he wants it to
be changed for all other instances, he needs to change it in the class
with:: A._var1 = 1
--
Erik Max Francis && [EMAIL PROTECTED] && http://www
t have
to be concerned about the precise case in which it's required, reducing
bugs when you change a block so that it would have been required if you
hadn't included it.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA &&
bruce wrote:
> basic question..
>
> how do i define a multi dimensional array
>
> a[10][10]
>
> is there a kind of a = array(10,10)
It's just a list of lists.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
Sa
y to rewrite this using methods (member functions).
>> [a.len() for a in ('abc', (1,2,3), [1,2], {1:2})]
>
> Did you actually try that?
He was answering a hypothetical. He wasn't suggesting that was valid
syntax today.
--
Erik Max Francis && [EMAIL PROTECTED] &a
alimoe wrote:
>> Genetic Programming or Genetic Algorithms?
>
> whats the difference?
Genetic algorithms usually involve the manipulation of bit strings.
Genetic programming usually involves more program-like constructs, such
as Lisp s-expressions.
--
Erik Max Francis &&a
Helmut Jarausch wrote:
> One step further
>
> try:
>eval(x+'0')
>
That is an exceedingly bad idea. Type:
__import__('sys').exit(),
in the prompt and see what happens.
You _never_ want to run `eval` on an untrusted string. Never.
--
E
that, you can define (or
get help defining) how to calculate them. As it is you've not given
nearly enough information to answer your question.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W &
to define more clearly what properties of this
negative function you want to narrow it down beyond that.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Get married, bu
efine them up front, it results in a very unsatisfactory
guessing game of proposing a function, you telling me what's wrong with
it, and repeat until either or both of us get bored.
And, by the way, this is a question about mathematics, and so has
nothing to do specifically with Python.
whether their identity is shared with other objects in other contexts is
never significant.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Little things / Cut like k
ource): return eval(source, {'builtins': {}})
...
>>> e('__import__("sys").exit()')
Oops, the interpreter exited.
Just when you think you've covered all the bases, you haven't.
--
Erik Max Francis && [EMAIL PROTECTED] && http://ww
oit I gave wouldn't have worked so easily.
The bottom line here is that you shouldn't even try to go through the
exercise of seeing if you can bullet-proof a solution using eval;
instead, you shouldn't even try.
--
Erik Max Francis && [EMAIL PROTECTED] && http://ww
in general, explicit
typechecks are not a good idea, since they often preclude user-defined
objects from being used. Instead, try performing the call and catch the
resulting TypeError:
>>> f = 'asdf'
>>> try:
... f()
... except TypeError:
... print "oops, f is
x27;.
That's what os.path.expanduser is for.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
It is much safer to obey than to rule.
-- Thomas a Kempis
--
http://mail.python.org/mailman/listinfo/python-list
>
> namespace { // Avoid cluttering the global namespace.
iostream and namespaces are both most definitely C++ features, not C.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfranc
s
that you're dealing with C++ code throughout, not C, contrary to what
you had claimed. C and C++ are not the same language.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M e
a set, then it
should either be a generator or a set.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Nothing is potent against love save impotence.
-- Samuel Butler
--
http://mail.python.org/mailman/listinfo/python-list
e as "temp_buf.write(v)".
> So the suggestion is to add a __iadd__ method to StringIO and cStringIO.
>
> Any thoughts?
Why? StringIO/cStringIO have file-like interfaces, not sequences.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
I urged a friend from Boeing to use python on a personal project. He liked it
and repeatedly urged a Boeing developer to use it. Python is on the list of
approved languages at Boeing. The developer wrote a thousand line enterprise
level program in Python. He reports that it would have take t
Are there any other reasons?
Because if you store a hash, then you can keep that around even when the
original file is archived, moved elsewhere, or deleted. It's awfully
helpful for building databases of files you've seen before.
--
Erik Max Francis && [EMAIL PROTECTED] &&
to get help will usually allow _you_ to
see where the problem was in the process.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
God said: "Let Newton be"; and all w
nced the latter if you list out the various pronounciations
for large n, seems me the _uhs_ outweigh the _oos_. (There's quadruple
on one side, but then quintuple, sextuple, septuple, heptuple, octuple,
etc., etc., etc.)
--
Erik Max Francis && [EMAIL PROTECTED] && http://w
in its history when every post had to be accompanied by a Monty Python
gag ...
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Whatever it is you came to teach me / I am here
there are no cartesian
products involved you're just talking about an element of a set, which
is just a thing.
Of course that's still a completely valid construct in Python so the
question stands. If a 4-tuple is a quadruple, a 3-tuple is a triple, a
2-tuple is an pair, then I gues
but there's already plenty of existing English usage such that
3-tuple : triple :: 2-tuple : pair. (A 2-tuple is an "ordered pair" in
mathematics.) If a 2-tuple is a pair, then it would seem to follow that
a 1-tuple is a single.
--
Erik Max Francis && [EMAIL PROTECTED
nipple?
We don't talk about that anymore since the Incident.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Society attacks early when the individual is helpless.
-- B.F. Skinner
--
http://mail.python.org/mailman/listinfo/python-list
I don't think it's something
we need to worry about. I'm sure you'd just call them "empty tuples" or
"0-tuples" and move on :-).
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 5
It's a "trip-you-uple", which you can pronounce anyway you like ;-)
All I hear there is "triple you up," which is good if you're in a poker
tournament, which I suppose tells you where my mind has been lately.
--
Erik Max Francis && [EMAIL PROTECTED] &&
tring (the help for sys.exit shows that if a
string is passed in, it will be printed before the process exits with
failure -- something I wasn't aware of actually).
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 2
typically use a normal ellipsis "..." to indicate any sort of
repeated pattern.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
To know oneself, one should assert oneself
cs doesn't change that fact.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
I will always remember / This moment
-- Sade
--
http://mail.python.org/mailman/listinfo/python-list
> Just keep doing what you are doing, please.
Note quite. The assignment of the resources to its variable needs to be
done before the try:
f = open(file)
try:
contents = f.read()
finally:
f.close()
--
Erik Max Francis && [EMAIL PROTECTED] &
aticMethod(x, y, z):
...
aStaticMethod = staticmethod(aStaticMethod)
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Wyrd has swept all my kin / all the brave chiefs away
d not only is that a major PITA, you almost never get it
> bug-for-bug right...
Especially since all of his examples have the same number of significant
digits (3), as the term is usually meant. Zeroes to the right are
significant, not zeroes to the left.
--
Erik Max Francis && [
Robert Kern wrote:
> There is no such command built in. You will have to build it yourself
> out of the components that are available.
linecache is probably what he's looking for.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose,
ly wanted to get the number of digits involved, then that's
fine, but that's not what significance is.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Eternity is very long, especially near the end.
-- Woody Allen
--
http://mail.python.org/mailman/listinfo/python-list
D H wrote:
> Yet again someone bitches about a thread right after they hypocritically
> throw their own little darts into the mix.
No one cares. Please take it elsewhere.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA &
Jonathan Bartlett wrote:
> I think you're misreading some of what is being said.
I think you're giving the author too much credit.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AI
this way?
Because it's not always needed. See staticmethod or classmethod.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
The basis of optimism is sheer terror.
-- Oscar Wilde
--
http://mail.python.org/mailman/listinfo/python-list
lias_, which acts as a verb, but won't be
automatically scanned as a verb when help is finding the list of valid
verbs:
alias_hi = verb_hello
...
That way, you get maximum effectiveness for minimum clutter.
--
Erik Max Francis && [EMAIL PROTECTED] && http:
uestion was asked before he went on to show what wasn't working
for him.)
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
To understand is to forgive, even oneself.
-
Jan Danielsson wrote:
>Is there any way to create a file with a specified size?
What do you want to put in the file? Once you've answered that
question, the solution should present itself.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
Sa
hen will all this information you can easily arrange the code to select
the best existing hand. Note that these all use well-established
techniques and reveal nothing secret.
> 3. x wild.
> For games like "deuces wild", what would be the best way to manage
> those? I tought
he same as the
straight set, then it's a straight. (Do this by reverse order of the
relative values of the straights, and stop when you find the first one,
to get the highest straight.) The most efficient way to do this is with
a bitmask, so that's how it's usually done.
--
s
> ...
You can also deal with them as a mask of card indexes. So the deuce of
clubs is bit 0, the three of clubs is bit 1, all the way up to the ace
of spades, which is bit 51. (That obviously won't fit in an int; you'll
need a long.)
--
Erik Max Francis && [EMAIL PR
Xah Lee wrote:
> Fuck the python doc wasted my time. Fuck python coders.
Use your words!
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
The mind is not a vessel to
ents, then that is trivially easy to do by creating such an
object and overriding its `__call__` method.
If you're not willing to do that, but still insisting that `c[:]()`
makes sense, then perhaps it would be more advisable to learn more about
Python rather than try to suggest profoun
ast):
File "", line 1, in ?
TypeError: 'str' object is not callable
You also seem to be under the impression that `x[:]()` is somehow
special syntax that is treated differently than `y = x[:]; y()`. It is not.
Besides, _ambiguity_ was never the problem. _Functionality_ is the p
either learning Python, or suggesting
useful improvements. That's just the way the ball bounces, unfortunately.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
To endure what is unendurable is true endurance.
-- (a Japanese proverb)
--
http://mail.python.org/mailman/listinfo/python-list
efined as the length of the subtended arc divided by the
length of the radius, which is a length divided by a length, and thus
dimensionless. (Like in a lot of dimensional analysis, you write "rad"
when desired to give a helpful hint, not because it's necessary; the
radian has the s
ret sin(1.2) as sine of an angle measured in
> degrees or radians (or whatever else).
The problem with this reasoning is when angular-dimensioned quantities
pop out of trigonometric functions, which happens routinely in the world
of calculus. When that happens, you use radians (or steradians) o
for the original function.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
The time to repair the roof is when the sun is shining.
-- John F. Kennedy
--
http://mail.python.org/mailman/listinfo/python-list
ere proposing this whole time.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Get there first with the most men.
-- Gen. Nathan Bedford Forrest, 1821-1877
--
http://mail.python.org/mailman/listinfo/python-list
ed to iterate over the first 2**22 items in a list of 2**22+1
> items, making a copy of the sub-list first would probably be a bad idea :)
Then again, in that case, so would making a list of the indices with
`range`, which is what the original poster was suggesting.
--
Erik Max Francis &&am
, as there's no point in reading in the whole
file before iterating over it. To get the same effect as file iteration
in later versions, use the .xreadlines method::
for line in aFile.xreadlines():
...
--
Erik Max Francis && [EMAIL PROTECTED] &&
ay to do it -- and it isn't
to read the whole thing in first for no reason whatsoever other than to
avoid an `x`.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
ess waste. This falls in the latter category.
Besides, someone was asking for/needing an older equivalent to iterating
over a file. That's obviously .xreadlines, not .readlines.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA &
which defaults to identity), and only support
comparisons when the user defines what it is he wants them to mean.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Water whic
it in hex string escape notation.
> Then if I try this:
>
> ---
> u_str = u"abc\u"
> reg_str = u_str.encode("utf-8")
> print reg_str
> ---
>
> I get the output:
>
> abc
>
> Here it looks like python isn't using the asci
onundrum of not understanding how the null set
relates to intersections.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Perfect girl / She was never me
-- Lamya
--
http://mail.python.org/mailman/listinfo/python-list
7 ( as
> defined in iso-8859-15 )
U+2019 is RIGHT SINGLE QUOTATION MARK. The APOSTROPHE (U+0027) is a
cross-reference as a similar code point, but they're not the same thing.
Your problem is that ISO-8859-15 doesn't have the RIGHT SINGLE QUOTATION
MARK, so you'll have to do the
**c), or they would have written
it more efficiently and clearly.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Men with empires in their purpose / And new eras in their b
ith ints!
But that's because ints are immutable, not because there is an explicit
copy of anything being made.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Ip
ld really like it if I could somehow do it in one
> line.
Why is doing it in one line a priority? Clarity is more important than
brevity.
Regardless, you can do it in one line with the sorted builtin:
>>> sorted(a.keys())
[1, 2, 3]
--
Erik Max Francis && [EMAIL PROTECT
g 1 forces me to do).
>
> Is there any way to combine the two? The ultimate would be if I
> somehow could take vector2 and hook the member self.vals[0] to self.x
> or something.
There are also full-featured Vector and Matrix classes in the la.py
module of ZOE:
http://www.alcyon
Ron Garret wrote:
> So this is clearly a bug, but surely I'm not the first person to have
> encountered this? Is there a known workaround?
It's hard to see how this demonstrates a bug in anything, since you're
telnetting to the wrong port in your example.
--
Erik
cent call last):
> File "", line 1, in
> File "", line 1, in bind
> socket.error: (48, 'Address already in use')
>>>> s.bind(('',8081))
>>>> s.listen(5)
>>>> f = s.accept()[0].makefile()
>>>> f.re
more general name for asyncore/asynchat is Medusa, and there are some
resources with more examples available here:
http://www.nightmare.com/medusa/
http://www.amk.ca/python/code/medusa.html
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
thing.
if x:
...
is not the same thing as
if x == True:
...
it's the same as
if bool(x):
...
So a more meaningful comparison of your two tests are:
>>> bool(0) == bool(False)
True
>>> bool([]) == bool(Fal
the end. Yes, it's the Laura Creighton
> article again:
>
> http://groups.google.com/group/comp.lang.python/msg/2de5e1c8384c0360
If so, be sure to click "More options," then "View thread," and then
read the responses. There were many reasonable objections to
g.
Really. He's not. That's a perfect example of a style guideline that
not only wastes energy, misses the point, but is totally wrong.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W &&
since it was not widely
granted as true.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Fear is an emotion indispensible for survival.
-- Hannah Arendt
--
http://mail.python.org/mailman/listinfo/python-list
Donn Cave wrote:
> "Not that it is of no historical interest" may have been too
> hard to follow, my apologies.
Yeah, my reading comprehension wasn't up to snuff that night.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jos
ng "PING" then
you do not want to do so by identity, but rather value, so you use the
`==` operator, not `is`.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
You could have another fate / You could be in another place
-- Anggun
--
http://mail.python.org/mailman/listinfo/python-list
Gilles Ganault wrote:
> I'm sure there's a much easier way to read a two-column, CSV file into
> an array, but I haven't found it in Google.
>
> Should I use the Array module instead?
The csv module? Or just .rstrip and .split?
--
Erik Max Francis &
ady
bound to it; probably you have an HTTP server already running as part of
your default software installation and don't realize it.
Choose another port.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W &
701 - 800 of 1012 matches
Mail list logo