Re: 4 hundred quadrillonth?

2009-05-24 Thread Erik Max Francis
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,

Re: 4 hundred quadrillonth?

2009-05-24 Thread Erik Max Francis
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

Re: Does '!=' equivelent to 'is not'

2008-06-16 Thread Erik Max Francis
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

Re: x, = y (???)

2008-07-17 Thread Erik Max Francis
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

Re: Python Written in C?

2008-07-20 Thread Erik Max Francis
...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

Re: Genetic programming: pygene, pygp, AST, or (gasp) Lisp?

2008-07-20 Thread Erik Max Francis
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

Re: Python Written in C?

2008-07-22 Thread Erik Max Francis
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] &&

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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

Re: iterating "by twos"

2008-07-29 Thread Erik Max Francis
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

Re: iterating "by twos"

2008-07-29 Thread Erik Max Francis
[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. -

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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&#

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-29 Thread Erik Max Francis
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,

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Erik Max Francis
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 && [

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread 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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-31 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-08-01 Thread Erik Max Francis
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

Re: My Python error...

2008-08-03 Thread Erik Max Francis
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

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-08-04 Thread Erik Max Francis
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

Re: Psycho question

2008-08-05 Thread Erik Max Francis
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

Re: Psycho question

2008-08-06 Thread Erik Max Francis
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

Re: Receive data from socket stream

2008-04-25 Thread Erik Max Francis
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

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread Erik Max Francis
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

Re: Do you know of a much simpler way of writing a program that writes a program?

2008-05-02 Thread Erik Max Francis
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 &

Re: list.index crashes when the element is not found

2008-05-03 Thread Erik Max Francis
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

Re: Feature suggestion: sum() ought to use a compensated summation algorithm

2008-05-03 Thread Erik Max Francis
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

Re: Feature suggestion: sum() ought to use a compensated summation algorithm

2008-05-03 Thread Erik Max Francis
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

Re: Decimal vs Float comparasion

2008-05-06 Thread Erik Max Francis
, 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 / 

Re: Mathematics in Python are not correct

2008-05-08 Thread Erik Max Francis
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

Re: why in returns values for array and keys for dictionary

2008-08-25 Thread Erik Max Francis
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

Re: why in returns values for array and keys for dictionary

2008-08-25 Thread Erik Max Francis
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 &

Re: Correcting for Drift between Two Dates

2008-09-08 Thread Erik Max Francis
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

Re: appending * to glob returns files with '*' !!

2008-09-21 Thread Erik Max Francis
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

Re: Add vs in-place add of str to list

2008-10-02 Thread Erik Max Francis
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

Re: asynchat - operation could not complete w/ blocking

2006-03-08 Thread Erik Max Francis
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

Re: beautiful soup library question

2006-03-10 Thread Erik Max Francis
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/

Re: how exactly do binary files work in python?

2006-03-12 Thread Erik Max Francis
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 &&

Re: markov query

2006-03-14 Thread Erik Max Francis
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

Re: Unpythonic? Impossible??

2006-03-19 Thread Erik Max Francis
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

Re: Unpythonic? Impossible??

2006-03-19 Thread Erik Max Francis
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 && [

Re: Strings and % sign fails - Help Please

2006-03-23 Thread 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

Re: Strings and % sign fails - Help Please

2006-03-23 Thread Erik Max Francis
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

Re: Difference between 'is' and '=='

2006-03-27 Thread Erik Max Francis
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

Re: difference between .cgi and .py

2006-03-29 Thread Erik Max Francis
, 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

Re: [ANN] markup.py - 1.2 - an HTML/XML generator

2006-04-03 Thread Erik Max Francis
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 &&

Re: efficiency of range() and xrange() in for loops

2006-04-05 Thread Erik Max Francis
>> 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

Re: New Karrigel page in Wikipedia

2006-04-13 Thread Erik Max Francis
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

Re: need clarification on -0

2009-11-30 Thread Erik Max Francis
;>> 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

Re: syntax error : first python program

2009-12-22 Thread Erik Max Francis
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

Re: Why ELIF?

2009-10-11 Thread Erik Max Francis
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 &

Re: a=[1,2,3,4].reverse() - why "a" is None?

2009-10-12 Thread Erik Max Francis
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 &

Re: id( ) function question

2009-10-14 Thread 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

Re: id( ) function question

2009-10-15 Thread Erik Max Francis
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

Re: id( ) function question

2009-10-16 Thread Erik Max Francis
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

Re: (from stdlib-sig) ctypes or struct from an h file

2009-10-18 Thread Erik Max Francis
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. -

Re: (from stdlib-sig) ctypes or struct from an h file

2009-10-19 Thread Erik Max Francis
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

Re: Is there a command that returns the number of substrings in a string?

2009-10-23 Thread Erik Max Francis
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

Re: Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-16 Thread Erik Max Francis
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

Re: Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-16 Thread Erik Max Francis
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:/

Re: Python-URL! - weekly Python news and links (Nov 24)

2009-11-24 Thread Erik Max Francis
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!

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Erik Max Francis
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

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Erik Max Francis
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

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Erik Max Francis
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

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Erik Max Francis
#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

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Erik Max Francis
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

Re: Classes and threading

2010-05-18 Thread Erik Max Francis
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

Re: question of style

2009-07-02 Thread Erik Max Francis
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

Einstein summation notation (was: question of style)

2009-07-16 Thread Erik Max Francis
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

Re: len() should always return something

2009-07-25 Thread Erik Max Francis
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

Re: len() should always return something

2009-07-25 Thread Erik Max Francis
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

Re: len() should always return something

2009-07-26 Thread Erik Max Francis
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 &&

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Erik Max Francis
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

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Erik Max Francis
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")

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Erik Max Francis
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

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Erik Max Francis
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 &&

Re: IOError: [Errno 22] invalid mode ('wb') or filename: in windows xp while making tarfile

2009-08-23 Thread Erik Max Francis
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

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-24 Thread Erik Max Francis
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

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-24 Thread Erik Max Francis
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

Re: Literal concatenation, strings vs. numbers

2009-08-24 Thread Erik Max Francis
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 &&

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-24 Thread Erik Max Francis
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

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-24 Thread Erik Max Francis
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

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-24 Thread Erik Max Francis
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

Re: Annoying octal notation

2009-08-24 Thread Erik Max Francis
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

Re: Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename: in windows xp while making tarfile

2009-08-24 Thread Erik Max Francis
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

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-26 Thread Erik Max Francis
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

Re: "Strong typing vs. strong testing"

2010-09-28 Thread Erik Max Francis
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

Re: "Strong typing vs. strong testing"

2010-09-28 Thread Erik Max Francis
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

Re: "Strong typing vs. strong testing"

2010-10-12 Thread Erik Max Francis
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/

Re: "glob.glob('weirdness')" Any thoughts?

2018-09-10 Thread Max Zettlmeißl via Python-list
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

Re: "glob.glob('weirdness')" Any thoughts?

2018-09-10 Thread Max Zettlmeißl via Python-list
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'] >>

<    5   6   7   8   9   10   11   >