erics Manual, 2nd Edition, published in 1988? It's
such a classic piece that I think it should be posted somewhere...
I only see used versions of it available for purchase. Care to hum a
few bars?
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose,
c.
Even if you restrict yourself to base-b expansions (for which the
statement is true for integer bases), you can cheat there too: e is 1
in base e.
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W &&a
perator tests identity.
If you don't specifically intend to test for identity, use `==`. If you
don't know what identity tests are for (with the exception of testing
for None-ness), then you don't need it.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyon
rence books but I could not find the answer to (1). I hope to
find a better Python reference!)
It's unpacking a 1-tuple:
(x,) = y
The parentheses here are not necessary and are sometimes left out.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max
...whereas
REAL WORLD programmers who want to be generally useful go and learn
C#.
Psst. What language do you think the primary implementations of C# is
written in?
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W
ush or PushGP. These are in effect a stack-based form
of Lisp, but which use different data stacks for different types.
Producing human-readable code from my genetic programming search would
be a great bonus -- and for me, at this moment, this seems to mean
Algol-style syntax. (Sigh.) But it
lackjack1.jpg
http://wps.com/projects/LGP-21/Software/LGP30-Blackjack2.jpg
and here's a scan of a printout of some "source code" (machine language):
http://wps.com/projects/LGP-21/Software/CrapGame.tiff
--
Erik Max Francis && [EMAIL PROTECTED] &&
nd code written to deal with sequences using duck typing (which
is typically nearly all Python code) don't have to know anything special
about your custom sequence class.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18
and zip. The use of
islice and izip is better, particularly if the list that's being
iterated over is large.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfranc
[EMAIL PROTECTED] wrote:
Whoops, I misread the original post. That would be:
for x, y in zip(a[::2], a[1::2]):
frob(x, y)
... which I don't use a lot.
Sorry, posted before I saw your reply. Still, you're building three
sublists in order to just iterate over them.
-
un drawing
imaginary lines in the sand.
Once again, I'm invoking the contraint against simply using x in a
boolean context, or passing x to a function expecting a boolean
doesn't count, since in those cases x can be set to the result of the
explicit test.
Next answer you
st. Simpler, in fact, than the ones you were advocating.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
An ounce of hypocrisy is worth a pound of ambition.
-- Michael Korda
--
http://mail.python.org/mailman/listinfo/python-list
you're thinking of (numeric types vs.
container types), there aren't any good examples. But who cares?
Polymorphism applies in more than just this one special case. You're
setting up a challenge that isn't very interesting, and which is rigged
so that no one can win because
or a list.
Having said that, it would sure be nice to be able to write
if myList is not empty:
I sure hope that's a joke. `x is not y` means something quite different.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 1
that would be an exceptionally bad way to test for None-ness,
since None is false. The test would never succeed.
Having said that, it would sure be nice to be able to write
if myList is not empty:
instead of
if len(myList) != 0:
I can agree with this.
I'm getting this sneakin
sense than the existing Boolean test.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
The doors of Heaven and Hell are adjacent and identical.
-- Nikos Kazantzakis
--
http://mail.python.org/mailman/listinfo/python-list
Russ P. wrote:
On Jul 29, 11:09 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
I'm getting this sneaking suspicion that you guys are all putting us on.
As I said in an earlier post, I realize that this would only work if
there were only one copy of "empty" (as ther
Russ P. wrote:
Come to think of it, shouldn't the list type have an "isempty" method?
Or does it?
Yes. It's written:
if not aList:
...
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA,
Russ P. wrote:
On Jul 29, 11:36 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
Russ P. wrote:
Come to think of it, shouldn't the list type have an "isempty" method?
Or does it?
Yes. It's written:
if not aList:
...
As you know, that is not qu
Carl Banks wrote:
I mean in general. I wouldn't spell it like that. I would prefer if
empty(x), with an __empty__ method. (And support __nonzero__ aka
__bool__ dropped completely.)
So your argument is purely about style, then. You just wish it were
written differently.
--
Eri
hing like the
modulus operator. In dynamic languages, the effect of operations depend
on their types. There's really no way around that, and Boolean testing
if an object as in `if x: ...` is no different. It means different
things depending on what `x` is.
--
Erik Max Francis && [
Russ P. wrote:
On Jul 30, 1:07 am, Erik Max Francis <[EMAIL PROTECTED]> wrote:
Russ P. wrote:
Oh, Lordy. I understand perfectly well how boolean tests, __len__, and
__nonzero__ work in Python. It's very basic stuff. You can quit
patronizing me (and Carl too, I'm sure).
You su
Y TO DO IT! Let
me repeat that for you: I DID NOT CLAIM THAT THIS IS THE WAY TO DO IT!
Did you get that, idiot?
So people who can read words but not minds are idiots. Go get 'em, tiger!
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, US
your words. Which, by the way, includes at least three people
other than myself.
But I'll bet the mindless namecalling is really working out for you.
Go, team, go!
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 1
Russ P. wrote:
On Jul 30, 9:27 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
You're sure going on about a distinction without a difference for a guy
who childishly likes to call other people names. A reasonable person
would have long ago moved on instead of blaming oth
fundamentals of Python, so you're just trying to make up controversy here.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
We all breathe the same air. We all cherish our
polymorphism. It's more confusing, if that's a benefit.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
In a cosmic setting, vast and old, beyond ordinary human
unde
It probably means that your text editor is saving as UTF-16 and it's
seeing part of a byte order marker (0xFE 0xFF or 0xFF 0xFE depending on
endianness) -- either that or you've accidentally injected some extra
garbage into the file. Save as ASCII instead.
--
Erik Max F
have a single `solve` function that accomplishes it.
Therefore, the general point about polymorphism still stands.
--
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 is
dule or two (so that code not using Psycho is absolutely
unaffected)?
That's correct. Hi, David!
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
Longevity has its plac
o. `range`
creates a list which is not really what you need.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
You and I / We've seen it all / Chasing our hearts' de
nt to transfer and for what purpose.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
In the final choice a solider's pack is not so heavy a burden as a
prisoner's
or a very conscious reason. Which is why the PATH exists in the
first place, and why invoking the script with env is preferable.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
--
http://mail.python.org/mailman/listinfo/python-list
templating system,
where most of the text is unmodified and you only set out the specific
areas where you want to insert logic.
EmPy is one:
http://www.alcyone.com/software/empy/
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA &
list; then, to
find the index of that object. That's pointless wasteful.
The Pythonic idiom is to catch the exception and then deal with it as
desired.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
--
http://mail.python.org/mailman/listinfo/python-list
string, which is nonsensical. You add
strings to strings, or lists to lists, but mixing them up doesn't make
sense. Python can't guess what you mean when you write something like
['abc', 'def'] + '' -- which is the functional equivalent of your call
to s
Torsten Bronger wrote:
No, the above expression should yield ''+'abc'+'efg', look for the
signature of sum in the docs.
You're absolutely right, I misread it. Sorry about that.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcy
, 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
;>> 0 and True
0
>>> 0 and False
0
>>> 0 or True
True
What you're seeing is simply the short-circuiting behavior of the `and`
and `or` operators; they return the last (relevant) value they
encountered before making their determination of the value of the
overall expre
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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && http://www.alcyone.com/m
sy ways to
verify you have a valid tensor equation using it.
--
Erik Max Francis && [email protected] && 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 && [email protected] && 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 && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA &&
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");
or this in Python:
print "hellow world"
W
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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && 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
James Harris wrote:
On 24 Aug, 02:19, Max Erickson wrote:
It can be assumed however that .9. isn't in binary?
That's a neat idea. But an even simpler scheme might be:
.octal.100
.decimal.100
.hex.100
.binary.100
.trinary.100
until it gets to this anyway:
.thiryseximal.100
At
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 && [email protected] && http://www.alcyone.com/max/
S
gure. 9 is not the same as 9.0 or 9.000.
--
Erik Max Francis && [email protected] && 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 && [email protected] && 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 && [email protected] && 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 && [email protected] && http://www.alcyone.com/max/
On Sun, Sep 9, 2018 at 2:20 PM, Gilmeh Serda
wrote:
>
> # Python 3.6.1/Linux
> (acts the same in Python 2.7.3 also, by the way)
>
from glob import glob
>
glob('./Testfile *')
> ['./Testfile [comment] some text.txt']
>
glob('./Testfile [comment]*')
> []
>
glob('./Testfile [comme
On Sun, Sep 9, 2018 at 6:03 PM, Thomas Jollans wrote:
> On 09/09/2018 02:20 PM, Gilmeh Serda wrote:
>>
>>
>> # Python 3.6.1/Linux
>> (acts the same in Python 2.7.3 also, by the way)
>>
> from glob import glob
>>
>>
> glob('./Testfile *')
>>
>> ['./Testfile [comment] some text.txt']
>>
901 - 1000 of 1012 matches
Mail list logo