ANN: EmPy 4.0.1

2024-01-01 Thread Erik Max Francis via Python-list
Py 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 W && S

ANN: EmPy 3.3.2 released (Python 3.x compatibility)

2014-01-28 Thread Erik Max Francis
. Additional fix for source compatibility between 2.x and 3.0. - 3.3.1; 2014 Jan 22. Source compatibility for 2.x and 3.0; 1.x and Jython compatibility dropped. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Jabber

ANN: EmPy 3.3.2 released (Python 3.x compatibility)

2014-01-28 Thread Erik Max Francis
. Additional fix for source compatibility between 2.x and 3.0. - 3.3.1; 2014 Jan 22. Source compatibility for 2.x and 3.0; 1.x and Jython compatibility dropped. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Jabber

Re: Python #ifdef

2013-06-02 Thread Erik Max Francis
is a decent piece of technology. Agreed. The terror that most people feel when hearing m4 is because m4 was associated with sendmail, not because m4 was inherently awful. It has problems, but you'd only encounter them when doing something _very_ abstract. -- Erik Max Francis m...@alcyone.com http

Re: Single leading dash in member variable names?

2012-09-11 Thread Erik Max Francis
. Thank you! PEP 8 says this is bad form. What do you think? Where does it say that? -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Jabber erikmaxfrancis I will always remember / This moment -- Sade -- http://mail.python.org

Re: Encapsulation, inheritance and polymorphism

2012-07-21 Thread Erik Max Francis
On 07/20/2012 02:05 AM, Virgil Stokes wrote: On 20-Jul-2012 10:27, Steven D'Aprano wrote: The fellow looked relived and said Oh thank god, I thought you said *million*! How does this relate to the python list? It's also a seriously old joke. -- Erik Max Francis m...@alcyone.com http

Re: Encapsulation, inheritance and polymorphism

2012-07-21 Thread Erik Max Francis
On 07/20/2012 03:28 AM, BartC wrote: Erik Max Francis m...@alcyone.com wrote in message news:gskdnwoqpkoovztnnz2dnuvz5s2dn...@giganews.com... On 07/20/2012 01:11 AM, Steven D'Aprano wrote: On Thu, 19 Jul 2012 13:50:36 -0500, Tim Chase wrote: I'm reminded of Graham's Number, which is so

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Erik Max Francis
ginormous.) You don't even need to go that high. Even a run-of-the-mill googol (10^100) is far larger than the total number of elementary particles in the observable Universe. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Jabber

Re: while True or while 1

2012-01-23 Thread Erik Max Francis
Giampaolo Rodolà wrote: Il 21 gennaio 2012 22:13, Erik Max Francis m...@alcyone.com ha scritto: The real reason people still use the `while 1` construct, I would imagine, is just inertia or habit, rather than a conscious, defensive decision. If it's the latter, it's a case of being _way_ too

Re: while True or while 1

2012-01-21 Thread Erik Max Francis
defensive. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Jabber erikmaxfrancis Ambition can creep as well as soar. -- Edmund Burke -- http://mail.python.org/mailman/listinfo/python-list

Re: while True or while 1

2012-01-21 Thread Erik Max Francis
` notation comes from back in the pre-Boolean days. In any reasonably modern implementation, `while True` is more self-documenting. I would imagine the primary reason people still do it, any after-the-fact rationalizations aside, is simply habit. -- Erik Max Francis m...@alcyone.com http

Re: Is it bad practise to write __all__ like that

2011-07-28 Thread Erik Max Francis
api(): pass @__all__ def db(): pass @__all__ def input(): pass @__all__ def output(): pass @__all__ def tcl(): pass Bravo! -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Jabber erikmaxfrancis Smaller than the eye can see

Re: Significant figures calculation

2011-06-28 Thread Erik Max Francis
Mel wrote: Erik Max Francis wrote: Chris Angelico wrote: On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Zero sig figure: 0 That's not really zero significant figures; without further qualification, it's one. Is 0.0 one sig fig or two? Two

Re: Significant figures calculation

2011-06-28 Thread Erik Max Francis
10^-8 kg, or on the order of 10^-8 kg (zero significant figures). To convert to energy, multiply by c^2. c = 3 x 10^8 m/s, so c^2 = 9 x 10^16 m^2/s^2, or about 10^17 m^2/s^2, so the Planck energy is on the order of 10^9 J. That's a calculation to zero significant figures. -- Erik Max

Re: Significant figures calculation

2011-06-28 Thread Erik Max Francis
Mel wrote: Erik Max Francis wrote: Mel wrote: By convention, nobody ever talks about 1 x 9.97^6 . Not sure what the relevance is, since nobody had mentioned any such thing. If it was intended as a gag, I don't catch the reference. I get giddy once in a while.. push things to limits

Re: Significant figures calculation

2011-06-27 Thread Erik Max Francis
curious as to whether a zero sig figures value is ever useful.) Yes. They're order of magnitude estimates. 1 x 10^6 has one significant figure. 10^6 has zero. -- 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 I

Re: Significant figures calculation

2011-06-27 Thread Erik Max Francis
. These aren't usually done in the e scientific notation, but it would be something like 10^3 (if we assume ^ is exponentiation, not the Python operator). c^2 is 9 x 10^16 m^2/s^2 to one significant figure. It's 10^17 m^2/s^2 to zero (order of magnitude estimate). -- Erik Max Francis m

Re: break in a module

2011-06-17 Thread Erik Max Francis
Steven D'Aprano wrote: On Thu, 16 Jun 2011 22:20:50 -0700, Erik Max Francis wrote: [...] Yes, which could be rephrased as the fact that `break` and `continue` are restricted to looping control structures, so reusing `break` in this context would be a bad idea. You know, kind of like the exact

Re: break in a module

2011-06-16 Thread Erik Max Francis
Eric Snow wrote: On Tue, Jun 14, 2011 at 5:51 PM, Erik Max Francis m...@alcyone.com wrote: Ethan Furman wrote: To me, too -- too bad it doesn't work: c:\temp\python32\python early_abort.py File early_abort.py, line 7 return ^ SyntaxError: 'return' outside function Nor should

Re: break in a module

2011-06-16 Thread Erik Max Francis
lookup where the keys are functions, and execute the value. Even then, unless there are quite a lot of cases, this may be overkill. -- 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 I am not afraid / To be a lone

Re: break in a module

2011-06-16 Thread Erik Max Francis
Chris Angelico wrote: On Fri, Jun 17, 2011 at 8:07 AM, Erik Max Francis m...@alcyone.com wrote: It's quite consistent on which control structures you can break out of -- it's the looping ones. Plus functions. No: def f(): ... break ... File stdin, line 2 SyntaxError: 'break' outside

Re: break in a module

2011-06-16 Thread Erik Max Francis
Chris Angelico wrote: On Fri, Jun 17, 2011 at 9:29 AM, Erik Max Francis m...@alcyone.com wrote: Chris Angelico wrote: On Fri, Jun 17, 2011 at 8:07 AM, Erik Max Francis m...@alcyone.com wrote: It's quite consistent on which control structures you can break out of -- it's the looping ones

Re: break in a module

2011-06-16 Thread Erik Max Francis
execute some code, use `if`. If you want to indicate an exceptional condition, raise an exception. -- 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 Human salvation lies in the hands of the creatively maladjusted

Re: break in a module

2011-06-16 Thread Erik Max Francis
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 Winners are men who have dedicated their whole lives to winning. -- Woody Hayes -- http://mail.python.org/mailman/listinfo/python-list

Re: break in a module

2011-06-16 Thread Erik Max Francis
Ian Kelly wrote: On Thu, Jun 16, 2011 at 7:21 PM, Erik Max Francis m...@alcyone.com wrote: Neither makes sense. `break` exits out of looping structures, which the top-level code of a module most certainly is not. Why does that matter? It seems a bit like arguing that the `in` keyword can't

Re: break in a module

2011-06-16 Thread Erik Max Francis
Ian Kelly wrote: On Thu, Jun 16, 2011 at 10:24 PM, Erik Max Francis m...@alcyone.com wrote: True. So let's use `in` to represent breaking out of the top-level code of a module. Why not, it's not the first time a keyword has been reused, right? The point is, if it's not obvious already from

Re: break in a module

2011-06-14 Thread Erik Max Francis
a great deal of meaning. -- 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 There is _never_ no hope left. Remember. -- Louis Wu -- http://mail.python.org/mailman/listinfo/python-list

Re: break in a module

2011-06-14 Thread Erik Max Francis
early_abort.py File early_abort.py, line 7 return ^ SyntaxError: 'return' outside function Nor should it. There's nothing to return out of. -- 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

Re: float(nan) in set or as key

2011-06-05 Thread Erik Max Francis
delta extended to the reals. Kronecker deltas are used all the time over the reals; for instance, in tensor calculus. Just because the return values are either 0 or 1 doesn't mean that their use is incompatible over reals (as integers are subsets of reals). -- Erik Max Francis m...@alcyone.com

Re: float(nan) in set or as key

2011-05-28 Thread Erik Max Francis
and sets rely on equality to test for uniqueness of keys or elements. nan = float(nan) nan == nan False In short, don't do that. -- 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 There was never a good war

Re: float(nan) in set or as key

2011-05-28 Thread Erik Max Francis
Albert Hopkins wrote: On Sun, 2011-05-29 at 00:41 +0100, MRAB wrote: 1.0 == 1.0 True float(nan) == float(nan) False I can't cite this in a spec, but it makes sense (to me) that two things which are nan are not necessarily the same nan. It's part of the IEEE standard. -- Erik Max Francis

Re: value of pi and 22/7

2011-03-17 Thread Erik Max Francis
bases. -- 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 They love too much that die for love. -- (an English proverb) -- http://mail.python.org/mailman/listinfo/python-list

Re: Strong typing vs. strong testing

2010-10-12 Thread Erik Max Francis
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/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Skype erikmaxfrancis Don't want you to leave / And I don't

Re: Strong typing vs. strong testing

2010-09-29 Thread Erik Max Francis
Keith Thompson wrote: Erik Max Francis m...@alcyone.com 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

Re: Strong typing vs. strong testing

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

Re: Classes and threading

2010-05-18 Thread Erik Max Francis
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 m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Erik Max Francis
? That'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 erikmaxfrancis I wonder if heaven got

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 m...@alcyone.com wrote: Patrick Maupin wrote: On Mar 2, 5:36 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: You seem to be taking the position that if you start with a config file config.json, it is too hard to edit

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Erik Max Francis
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 erikmaxfrancis It's better to be quotable than to be honest. -- Tom Stoppard -- http://mail.python.org

Re: Draft PEP on RSON configuration file format

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

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Erik Max Francis
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 quotable than to be honest. -- Tom Stoppard -- http://mail.python.org/mailman/listinfo/python-list

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 m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA

Re: need clarification on -0

2009-11-30 Thread Erik Max Francis
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 expressions. See python.org/doc for more information. -- Erik Max Francis m

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

2009-11-24 Thread Erik Max Francis
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!M/Skype erikmaxfrancis Nine worlds I remember

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

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

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

2009-11-16 Thread Erik Max Francis
, 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://www.alcyone.com/max/ San Jose, CA, USA

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

2009-10-23 Thread Erik Max Francis
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 Diplomacy and defense are not substitutes for one another. Either alone would fail. -- John

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

2009-10-18 Thread Erik Max Francis
. -- 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. -- John F. Kennedy, 1917-1963 -- http://mail.python.org/mailman/listinfo

Re: id( ) function question

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

Re: id( ) function question

2009-10-15 Thread Erik Max Francis
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 AIM/Y!M/Skype erikmaxfrancis When the solution

Re: id( ) function question

2009-10-14 Thread Erik Max Francis
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 Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37

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 m

Re: Why ELIF?

2009-10-11 Thread Erik Max Francis
. 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 37 18 N 121 57 W AIM/Y!M/Skype

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

2009-08-26 Thread Erik Max Francis
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 seem to be doing. -- 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

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

2009-08-24 Thread Erik Max Francis
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 Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Skype

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

2009-08-24 Thread Erik Max Francis
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 37 18 N 121 57 W AIM/Y!M/Skype erikmaxfrancis Do not seek death. Death will find

Re: Literal concatenation, strings vs. numbers

2009-08-24 Thread Erik Max Francis
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 AIM/Y!M/Skype erikmaxfrancis Do not seek death. Death will find you. -- Dag Hammarskjold -- http://mail.python.org

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 m...@alcyone.com 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

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

2009-08-24 Thread Erik Max Francis
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 Do not seek death. Death will find you. -- Dag Hammarskjold -- 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
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/ San Jose, CA, USA 37

Re: Annoying octal notation

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

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

2009-08-24 Thread Erik Max Francis
colons? Is it necessary? I dealt 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.alcyone.com/max

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

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

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

2009-08-16 Thread Erik Max Francis
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 independently and haven't seen a need to change. -- Erik Max Francis m...@alcyone.com http

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 m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Skype erikmaxfrancis Get there first

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

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

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 m...@alcyone.com wrote: Grant Edwards wrote: On 2009-08-14, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: What the hell would it actually do??? IIRC in C++, cout Hello world; is equivalent to this in C: printf

Re: len() should always return something

2009-07-26 Thread Erik Max Francis
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 37 18 N 121 57 W AIM/Y!M/Skype erikmaxfrancis Scars are like memories. We do

Re: len() should always return something

2009-07-25 Thread Erik Max Francis
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 the atom endures. -- Alexander Chase -- http://mail.python.org/mailman/listinfo/python-list

Re: len() should always return something

2009-07-25 Thread Erik Max Francis
that such a feature of a language would a priori be poor design. It _isn't_ poor design for special purpose languages. Python isn't one of them, but Matlab _is_. -- 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 More fodder

Einstein summation notation (was: question of style)

2009-07-16 Thread Erik Max Francis
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 proverb) -- http://mail.python.org/mailman

Re: 4 hundred quadrillonth?

2009-05-25 Thread Erik Max Francis
, etc. 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 m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M, Skype erikmaxfrancis

Re: 4 hundred quadrillonth?

2009-05-24 Thread Erik Max Francis
, and the foreword he wrote to the Apple Numerics 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 m...@alcyone.com http

Re: Marshal vs pickle...

2009-04-25 Thread Erik Max Francis
their functionality in detail. -- 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 The hour which gives us life begins to take it away. -- Seneca -- http://mail.python.org/mailman/listinfo/python-list

Re: iterator question

2009-04-02 Thread Erik Max Francis
object, so successive calls to .next give you success iteration values like you intended. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M erikmaxfrancis We must all hang together, or, most assuredly, we will all hang separately

Re: c.l.py dead, news at 11 (was Re: Mangle function name with decorator?)

2009-03-27 Thread Erik Max Francis
) posts is steadily dropping over time. If you look at http://mail.python.org/pipermail/python-list/ it doesn't make it clear that there is any sort of decline. ... And made all purdy-like: http://www.alcyone.com/tmp/python-list%20traffic.pdf -- Erik Max Francis m...@alcyone.com

Re: Byte type?

2009-02-14 Thread Erik Max Francis
) 'x' repr(xx[0]) 'x' repr(xx[0][0]) 'x' But that's not what repr indicates. The bytearray element is apparently being promoted to bytes as soon as it comes out of the array. There's no distinction byte type. A single character of a bytes type is also a bytes. -- Erik Max Francis m

Re: Using equals operator without changing reference pointer

2009-01-29 Thread Erik Max Francis
there is some keyword that I don't know about. No. The assignment operator with a bare name on the left hand side is not overridable. You can override attribute access, however, with .__getattr__/.__getattribute__. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose

Re: Function arguments

2009-01-26 Thread Erik Max Francis
been nice to be able to do that. Look up the function call syntaxes with * and **: def foo(*args): print args ... def bar(**keywords): print keywords ... foo(1, 2, 3) (1, 2, 3) bar(a=1, b=2, c=3) {'a': 1, 'c': 3, 'b': 2} -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San

Re: English-like Python

2009-01-20 Thread Erik Max Francis
, since functions (procedures) take a fixed number of arguments. Parentheses are only required when you're adding optional arguments. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M erikmaxfrancis Conversation is the enemy

Re: English-like Python

2009-01-16 Thread Erik Max Francis
alex23 wrote: On Jan 16, 5:39 pm, Erik Max Francis m...@alcyone.com wrote: Inform 7 has some interesting ideas, but I think the general problem with English-like programming language systems is that once you get into the nitty gritty details, you end up having to know exactly the right things

Re: English-like Python

2009-01-15 Thread Erik Max Francis
programming language syntax. In the big picture I don't think it helps much. After all, there's a reason that most modern programming languages don't look like COBOL or AppleScript. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y

Re: why cannot assign to function call

2009-01-07 Thread Erik Max Francis
implementation dependent when and under what circumstances fundamental immutable objects are reused, and it's not useful anyway; what you care about is whether two objects are equal or not, not whether they're the same object through some optimization behind the scenes. -- Erik Max Francis m

Re: why cannot assign to function call

2009-01-05 Thread Erik Max Francis
(especially since the term _identity_ isn't even used in remotely the same way) is simply ignoring the fact that other people either won't know what you mean or will presume you're misunderstanding something. Because, based on your previous comments, you are. -- Erik Max Francis m

Re: why cannot assign to function call

2009-01-02 Thread Erik Max Francis
objects are the same as each other. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M erikmaxfrancis Scars are like memories. We do not have them removed. -- Chmeee -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-02 Thread Erik Max Francis
Derek Martin wrote: On Fri, Jan 02, 2009 at 12:50:44PM -0800, Erik Max Francis wrote: Identity isn't defined on math objects, only on Python objects; there is no notion of 'is' in math. This is also false, it even has its own operator (which requires Unicode to display): ≡ That can mean

Re: why cannot assign to function call

2008-12-28 Thread Erik Max Francis
the interpreter refused to do that ? Because, as in most languages, it's not even clear what you might mean by this syntax. It doesn't have any meaning; assignments are made to variables, not the results of function calls. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose

Re: Removing None objects from a sequence

2008-12-12 Thread Erik Max Francis
Filip Gruszczyński wrote: I would like to iterate over a sequence nad ignore all None objects. The most obvious way is explicitly checking if element is not None, but it takes too much space. That doesn't make much sense; why would iterating over the sequence take more _space_? -- Erik Max

Re: Removing None objects from a sequence

2008-12-12 Thread Erik Max Francis
, for that matter. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M erikmaxfrancis God grant me to contend with those that understand me. -- Thomas Fuller -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Erik Max Francis
. -- Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M erikmaxfrancis There are not fifty ways of fighting, there is only one: to be the conqueror. -- Andrew Malraux, 1937 -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Erik Max Francis
about # and !=? Last I heard, they were all part of Python. None of these are identifiers at all. You might want to read up on the language reference to see what an identifier actually is. -- Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W

Re: python vs smalltalk 80

2008-11-19 Thread Erik Max Francis
Lawrence D'Oliveiro wrote: gavino wrote: which is nicer? If I were to lock you and INTERCAL in a room until only one is left alive, who do you think would survive? The rest of us. -- Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Erik Max Francis
because of his simplicity in comparison with c++. Maybe People would like him even more it would be a bit more simple but the same powerfull. The problem is your suggestion would make Python a worse tool, not a better one. -- Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/ San

Re: type-checking support in Python?

2008-10-07 Thread Erik Max Francis
five men make in two weeks?). -- Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M erikmaxfrancis Those who forget the past are condemned to repeat it. -- George Santayana -- http://mail.python.org/mailman/listinfo/python-list

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

2008-10-02 Thread Erik Max Francis
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 + (1, 2, 3) Traceback (most recent call last): File stdin, line 1, in ? TypeError: can only concatenate list (not tuple) to list -- Erik Max Francis [EMAIL

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

2008-09-21 Thread Erik Max Francis
? 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 cowards if they had courage enough. -- Thomas Fuller -- http://mail.python.org/mailman

Re: Correcting for Drift between Two Dates

2008-09-08 Thread Erik Max Francis
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 to be quotable than to be honest. -- Tom Stoppard -- http://mail.python.org/mailman/listinfo/python-list

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

2008-08-26 Thread Erik Max Francis
, or combination of data structures. That's not what dictionaries are for. -- Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM, Y!M erikmaxfrancis Well I have been puppetized / Oh how I have compromised -- Lamya -- http://mail.python.org

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

2008-08-26 Thread Erik Max Francis
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 37 18 N 121 57 W AIM, Y!M erikmaxfrancis Well I have

Re: Psycho question

2008-08-06 Thread Erik Max Francis
` 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' desire -- The Russian and Florence, _Chess_ -- http

  1   2   3   4   5   6   >