, so silently
returning a completely invalid comparison is a tremendously bad idea.
It's a bug.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
Can I walk with you /
tical equation, this means (translated to Python)
-(x**2), not (-x)**2.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
I sleep and dream that life is / All beauty
-- La
because that tends to be what you're usually more interested in, and is
more efficient. For another thing, if you're doing a lot of testing for
containment in values, then it's likely you're not using the right data
structure, or combination of data structures. That's n
how
the dictionary data structure works. If you're doing this an awful lot
-- whether testing for inclusion or iterating -- then you're probably
using the wrong data structure.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA &
ot at all clear what it
is you're trying to do and why it isn't doing what you think it should.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
It's better
turned anyway? :-/
A bug?
No, it means you actually have a file named 'EN*' in the directory.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
Many would be cowa
which treats its argument as a generic sequence, and
doesn't enforce type. The same thing happens with any other sequence
type as the right-hand operand; for instance, tuples:
>>> a = []
>>> a += (1, 2, 3)
>>> a
[1, 2, 3]
>>> a = []
>>> a = a
doesn't
block. In other words, all you want to do is call
push/push_with_producer and leave it at that.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Eppur, si muove! [But still it moves!]
-- Galileo Galilei
--
http://mail.python.org/mailman/listinfo/python-list
t a line break.
If it were XHTML, it would be , indicating that it's a
standalone tag.
Instead you want to traverse the contents of the font tag, taking into
account line breaks that you encounter.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
u're dealing with a high-level language, you can also just use the
pickle module for a more general form of serialization and persistence.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W &&
hether these are called markov
> tables, transition tables or probability tables? I am not sure i am
> referring to this correctly and what the differences would be if any
They're called Markov chains.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.co
From the user's perspective, there's no difference
from calling a class A to instantiate it, and calling a factory function
called A that selects the appropriate class and returns an instance of it.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
Sa
lent from the user's perspective, and all require
upkeep, but some require more upkeep than others. In a dynamic language
like Python, the best solution is the most straightforward one that
requires the least upkeep. And that's a factory pattern.
--
Erik Max Francis && [
h psycopg
>> package. Any quick way to project a string from freak '%' problems?
>
> Try using r"string '%'"...
Raw strings don't have anything to do with format specifiers.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.c
or.execute does format expansion with %, so a
single % is not legal.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
We are victims of our circumstance.
-- Sade Adu
--
http://mail.python.org/mailman/listinfo/python-list
that
maybe all Python entities are true objects and that integers are
immutable, which are things hopefully everyone was already aware of.
If you're trying to test integer equality, you should be using the `==`
operator, not the `is` operator, so what you find out about how things
are cachin
, do it effects performance ??
Unless the server is fundamentally broken, it will make no difference
whatsoever.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Physics, as we know it, w
ndicates that `klass` is more commonly
mentioned than `class_`. `cls`, at least, is more commonly used within
Python itself (e.g., classmethods).
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W &&
>> a, b, c = xrange(3)
>>> a
0
>>> b
1
>>> c
2
There are certainly contexts where a sequence and its iterator are not
interchangeable. You missed an obvious one:
>>> range(3) == xrange(3)
False
--
Erik Max Francis && [EMAIL PROTECTED] &am
result
of an "encyclopedia" which anyone can edit.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Sitting in the den and / Looking at the phone as if it owed / Owed
ssions. See python.org/doc for more information.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
You'll survive / A true Darwin star
-- Des'ree
--
http://mail.python.org/mailman/listinfo/python-list
pradeep wrote:
I have this file in linux
===
sample.py
#!/usr/bin/env python
name = "blah"
print name
...
Any one knows , whats the syntax error here?
You're indenting for no reason.
--
Erik Max Francis && m...@alcyone.com && h
xpressions. Variations of `else if` in `if ... else if ...` chains is
routine in computer languages. Choosing a deliberately different syntax
just for the sake it of is obtuse at best.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA &
Andre Engels wrote:
The reverse function is a function to reverse the list in place, not a
function to get the reverse of the list:
x = [1,2,3,4]
y = x
z = x.reverse()
will result in:
x = y = [4,3,2,1]
z = None
.reverse returns None. See the documentation.
--
Erik Max Francis &
what the value of `id` is or how the `is` operator works, the short
version is, don't worry about them, as you won't be using them.
I'm really rather surprised at the number of questions about them.
They're really something one does not need to worry about.
--
Erik Max Fr
x27;re the same object is pretty much never useful. The
other canonical use of `is` would be comparison to `None`, which is also
perfectly appropriate.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && A
of and
would have no obligation to switch to, just as with 3.0.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Nothing spoils a confession like repentence.
-- Anatole France
--
http://mail.python.org/mailman/listinfo/python-list
these things will be the same.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Diplomacy and defense are not substitutes for one another. Either
alone would fail. -
on defined and need not be supported by any
compilers.
The proper way to do this is to define a protocol and translate it to
the native structures on both sides of the communication -- both in
Python and in C. There's really no way around this.
--
Erik Max Francis && m
ng. I'm wondering if there is a function in
python which can directly return this information.
The .count string method.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
was not a
suggestion to change Python.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Mona Lisa / Come to discover / I am your daughter
-- Lamya
--
http://mail.python.org/mailman/listinfo/python-list
the same syntax, with `fi` written instead of `endif` -- not sure
why the difference in keyword is that big of a deal to you.
As others have pointed out, either way, there are quite a few languages
that use this type of syntax.
--
Erik Max Francis && m...@alcyone.com && http:/
t the answer they're looking for. The former is
surely just laziness, but there's something psychological going on with
the latter.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!
not one of them.
Agreed. Even YAML's acronym indicates that it is already a bridge too
far; we don't need more.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmax
point out
that in their opinion it's not such a good idea. You don't own this or
any other thread.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
It's better to be quotable than to be honest.
-- Tom Stoppard
--
http://mail.python.org/mailman/listinfo/python-list
make your own "more readable"
format. If JSON is unreadable, so must be RSON.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
It's better to be quotab
#x27;s the argument being used against you, not the argument being
ascribed to you. You're getting confused about something, somewhere.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype
Patrick Maupin wrote:
On Mar 2, 9:20 pm, Erik Max Francis wrote:
Patrick Maupin wrote:
On Mar 2, 5:36 pm, Steven D'Aprano wrote:
You seem to be taking the position that if you start with a config file
config.json, it is "too hard to edit", but then by renaming it to
config.rs
t_ take any arguments, and
explicitly call its parent constructor not passing anything. So it
shouldn't be a wonder that it won't accept any arguments.
If you don't intend to override the constructor in the parent class,
simply don't define it.
--
Erik Max Francis &&am
ngely turned inside out. You're obviously looking for
which one _isn't_ `None`, so write the tests that way. It's much easier
for everyone else (including your potential future self) to follow.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/m
sy ways to
verify you have a valid tensor equation using it.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
If the sky should fall, hold up your hands.
-- (a Spanish
there are numerous applications where scalars and
1x1 matrices are mathematically equivalent.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Gods are born and die, but
Chris Rebert wrote:
On Sat, Jul 25, 2009 at 4:21 PM, Erik Max Francis wrote:
Steven D'Aprano wrote:
But it's not "practically every function". It's hardly any function at all
-- in my code, I don't think I've ever wanted this behavior. I would
consider it an
eparate entity.
Especially if you're dealing with a special-purpose language where
everything is really a form of an generalized array representation of
something _anyway_.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA &&
ell, plus or minus newlines.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
It's hard to say what I want my legacy to be when I'm long gone.
-- Aaliyah
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
On 2009-08-14, Erik Max Francis wrote:
Grant Edwards wrote:
On 2009-08-14, Steven D'Aprano wrote:
What the hell
would it actually do???
IIRC in C++,
cout << "Hello world";
is equivalent to this in C:
printf("Hellow world")
nt.
Given the history of programming languages, it doesn't really look like
the to-be-assigned variable being at the end of expression is going to
get much play, since not a single major one I'm familiar with does it
that way, and a lot of them have come up with the same convention
Douglas Alan wrote:
Personally, my favorite is Lisp, which looks like
(set! y (+ y 1))
For varying values of "Lisp." `set!` is Scheme.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W &&
trings), too, or that's going to bite you sometime later (but it's not
your main problem here).
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Every human being is a problem in search of a solution.
-- Ashley Montague
--
http://mail.python.org/mailman/listinfo/python-list
large literals, I'd go with having spaces indicate automatic
concatenation (though only the first in the series can indicate the
radix, whichever method you choose above). It's the same as for
strings, and it's the common SI recommendation for thousands separators
anyway.
--
Erik Ma
with decimal 304?
You can't, and the operation makes no sense, which is what makes the
syntax unambiguous. An extended numeric literal continues the radix of
wherever it started.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA &a
ne so upset by this that it didn't make it into the language, or
cause huge confusion on a regular basis that upsets a lot of users? Nope.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W &&
James Harris wrote:
On 24 Aug, 09:05, Erik Max Francis wrote:
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
third letter of octal as X is the third letter of hex.) The numbers
above would be
0b1011, 0
hard to imagine).
Either way, conversion is, as Max showed, one line of code. It's hard
to see the explicit need for truly arbitrary-radix literals in any
language -- and I'm the guy who's put quaternary literals in syntaxes
he's had to develop just for fun. Binary
Hendrik van Rooyen wrote:
I also tried to include an example of a literal with a base of a Googol but I
ran out of both ink and symbols.
:-)
... or particles in the observable Universe, for that matter.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
S
gure. 9 is not the same as 9.0 or 9.000.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
If the sky should fall, hold up your hands.
-- (a Spanish proverb)
--
http://mail.python.org/mailman/listinfo/python-list
lt with it. Had to change 'w:bz2' into 'w|bz2'.
But now have another problem:
It's the same problem, asked and answered. Why not read the replies of
the people telling you what the problem is?
--
Erik Max Francis && m...@alcyone.com && http://www.alcyon
ant to talk about it you
have to disclaim that it's not a proper base and that's you're making up
as you go. But you can't pretend like it's the "obvious" mathematical
meaning just because the usual mathematical meaning doesn't apply, which
is what you see
ror: and
do not have compatible units
And everybody's favorite:
>>> print ((epsilon_0*mu_0)**-0.5).simplify()
299792458.011 m/s
>>> print c # floating point accuracy aside
299792458.0 m/s
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
In Heaven all the interesting people are missing.
-- Friedrich Nietzsche
--
http://mail.python.org/mailman/listinfo/python-list
Keith Thompson wrote:
Erik Max Francis writes:
[...]
>>> print c # floating point accuracy aside
299792458.0 m/s
Actually, the speed of light is exactly 299792458.0 m/s by
definition. (The meter and the second are defined in terms of the
same wavelength of light; this wa
ey'll work will help alone. If you're calling a trigonometric
function with a dimensionless argument, you either mean radians are
you've got bigger problems with the understanding of unit systems.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
nges between EmPy 3._x_
and
4.0](http://www.alcyone.com/software/empy/ANNOUNCE.html#full-list-of-changes-between-empy-3-x-and-4-0)
for a more comprehensive list.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57
. See
[Full list of changes between EmPy 3._x_ and
4.0](http://www.alcyone.com/software/empy/ANNOUNCE.html#all-changes)
for a more
comprehensive list.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W &am
list gatewayed to usenet though, there's
really nothing so good as usenet for proper discourse (!).
Hear, hear!
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && Skype erikmaxfrancis
The quality
601 - 664 of 664 matches
Mail list logo