Re: Python #ifdef

2013-06-02 Thread Erik Max Francis
hp files). But still, GNU M4 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_ abs

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Erik Max Francis
n Graham's Number but still inconceivably 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://w

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

Re: Encapsulation, inheritance and polymorphism

2012-07-21 Thread Erik Max Francis
On 07/20/2012 03:28 AM, BartC wrote: "Erik Max Francis" 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, whi

Re: Single leading dash in member variable names?

2012-09-11 Thread Erik Max Francis
as syntactic significance. 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

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 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 defensi

Re: float("nan") in set or as key

2011-06-05 Thread Erik Max Francis
ite a different thing, not simply a Kronecker 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

Re: break in a module

2011-06-14 Thread Erik Max Francis
onsist of mostly definitions. Modules can interact with each other, be called recursively, etc., and so at an arbitrary point saying, "break out of this module" doesn't have 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
eak". 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 it. There's nothing to return out of. -- Erik Max Francis && m.

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 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 funct

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 erikmaxf

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 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 "", line 2 SyntaxError: 

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 wrote: Chris Angelico wrote: On Fri, Jun 17, 2011 at 8:07 AM, Erik Max Francis wrote: It's quite consistent on which control structures you can break out of -- it's the looping ones. Plus functions. N

Re: break in a module

2011-06-16 Thread Erik Max Francis
`. If you want to conditionally 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 eri

Re: break in a module

2011-06-16 Thread Erik Max Francis
t you're just being difficult. -- 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 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 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 be use

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 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-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

Re: Significant figures calculation

2011-06-27 Thread Erik Max Francis
ero 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

Re: Significant figures calculation

2011-06-27 Thread Erik Max Francis
igure would be an order of magnitude estimate only. 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/

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 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. (Just vaguely curiou

Re: Significant figures calculation

2011-06-28 Thread Erik Max Francis
t 2 x 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. --

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: Is it bad practise to write __all__ like that

2011-07-28 Thread Erik Max Francis
f.append(obj.__name__) return obj __all__ = AllList() @__all__ def 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,

Re: value of pi and 22/7

2011-03-17 Thread Erik Max Francis
quency. In all 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: float("nan") in set or as key

2011-05-28 Thread Erik Max Francis
nan} {nan} It's fundamentally because NaN is not equal to itself, by design. Dictionaries 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 &&

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 t

Re: What is "self"?

2005-09-22 Thread Erik Max Francis
Ron Adam wrote: > When you call a method of an instance, Python translates it to... > > leader.set_name(leader, "John") It actually translates it to Person.set_name(leader, "John") -- Erik Max Francis && [EMAIL PROTECTED] && http://ww

Re: Human readable number formatting

2005-09-27 Thread Erik Max Francis
; formatting , so I've taken a stab at it: BOTEC at http://www.alcyone.com/software/botec/ contains a class called SI which does this formatting (and supports all SI prefixes). -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA,

Re: Where to find python c-sources

2005-09-29 Thread Erik Max Francis
research on Google? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis The people are to be taken in very small doses. -- Ralph Waldo Emerson -- http://mail.python.org/mailman/listinfo/python-list

Re: Google Not Universal Panacea [was: Re: Where to find python c-sources]

2005-09-30 Thread Erik Max Francis
ing if I (and nobody else) answered his question and just rudely pointed him to Google. But since I actually answered his question, looks to me like someone just wanted to stand on his soapbox today. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.co

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Erik Max Francis
made him change his mind? When the debates raged over PEP 308, he seemed pretty dead set against it (at least by proxy) ... -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis

Re: Google Not Universal Panacea [was: Re: Where to find python c-sources]

2005-10-01 Thread Erik Max Francis
a search engine won't be the most practical way to do research. This was _certainly_ not one of those cases. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis No mistaking / Just

Re: Python based unacceptable language filter

2005-10-03 Thread Erik Max Francis
the text, but then discards it. You meant: for badWord in badWords: textToFilter = textToFilter.replace(badWord, '<)!&%(#&)%>') -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 12

Re: check html file size

2005-10-04 Thread Erik Max Francis
Matt Garrish wrote: > Even if you weren't an incredibly offensive and petulant poster, what makes > you think anyone would write a script from you? Because in addition to being offensive and petulant, he's also an idiot. -- Erik Max Francis && [EMAIL PROTECTED] &

Re: dictionaries/pointers

2005-10-07 Thread Erik Max Francis
=None): self.value = value ...def get(self): return self.value ...def set(self, value): self.value = value ... >>> one = Container(1) >>> myDictionary = {} >>> myDictionary['a'] = one >>> myDictionary['b'] = one >>> myDictionary['b&#x

Re: piping out binaries properly

2005-10-11 Thread Erik Max Francis
he pbmplus library, and so forth. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Every human being is a problem in search of a solution. -- Ashley Montagu -- http://mail.python.org/mailman/listinfo/python-list

Re: TurboGears /.-ed, >new == True< or >new == "True"

2005-10-13 Thread Erik Max Francis
Andy Leszczynski wrote: > So how does it correspond to other piece of the code: > > 2 def notfound(self, pagename): > 3 return dict(pagename=pagename, data="", new=True) > > new is a boolean here? It comes through as a CGI query. -- Erik Max Francis

Re: 1-liner to iterate over infinite sequence of integers?

2005-10-13 Thread Erik Max Francis
ield 0 x = 1 while True: yield x yield -x x += 1 ... which is also not a bad demonstration of how the integers are countably infinite. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ S

Re: Problem splitting a string

2005-10-14 Thread Erik Max Francis
tr.split('_| '), but this gave me: > > ['this_NP is_VL funny_JJ'] > > It is not splitted at all. Use re.split: >>> re.split('_| ', s) ['this', 'NP', 'is', 'VL', 'funny', 'JJ']

Re: List of strings to list of floats ?

2005-10-17 Thread Erik Max Francis
Madhusudan Singh wrote: > Thanks. Now, a slightly more complicated question. > > Say I have two lists of floats. And I wish to generate a list of floats that > is a user defined function of the two lists. result = [sqrt(x**2 + y**2) for x, y in zip(xs, ys)] -- Erik

Re: Stripping ASCII codes when parsing

2005-10-17 Thread Erik Max Francis
chr(x) for x in range(32) + [124]) aNewString = aString.translate(IDENTITY_MAP, BAD_MAP) Note that ASCII 31 is also a control character (US). -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W &&

Re: how best to split into singleton and sequence

2005-10-18 Thread Erik Max Francis
generates a ValueError. Did you want to only split once at most? Then it's s.split('|', 1). Did you want to assign the first element to the first variable and the rest to the next? Then it's x = s.split('|'); a, b = x[0], x[1:]. -- Erik Max Francis && [EMAIL

Re: Set an environment variable

2005-10-21 Thread Erik Max Francis
executed in it would have no effect on the state of another. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Success and failure are equally disastrous. -- Tennessee Wi

Re: path

2005-10-22 Thread Erik Max Francis
Help on function index in module string: index(s, *args) index(s, sub [,start [,end]]) -> int Like find but raises ValueError when the substring is not found. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 2

Re: An interesting question about "print '\a'"

2005-10-23 Thread Erik Max Francis
terminals respond by beeping. Since, when you're logged into a remote machine, it's your terminal that's displaying the output of your remote session, that's why you hear the beep on your local machine. -- Erik Max Francis && [EMAIL PROTECTED] && http://

Re: XML Tree Discovery (script, tool, __?)

2005-10-24 Thread Erik Max Francis
is. Look up XML DOM. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis An ounce of hypocrisy is worth a pound of ambition. -- Michael Korda -- http://mail.python.org/mailman/listinfo/python-list

Re: a Haskell a Day

2005-10-26 Thread Erik Max Francis
Xah Lee wrote: > This is my learning notes on Haskell. I call it a-Haskell-a-day. Another day, another community to completely piss of, huh, Xah? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W &&

Re: Rich __repr__

2005-10-31 Thread Erik Max Francis
s can't handle these, of course). If it's a relatively straightforward class where the entire state is exposed through the constructor, then a friendly repr is possible. Otherwise, it's not, and trying to otherwise do so may just be confusing. -- Erik Max Francis &&

Re: Rich __repr__

2005-11-02 Thread Erik Max Francis
on the circumstances. There is no uniform solution here. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis We must all hang together, or, most assuredly, we will all hang sepa

Re: R.I.P. Vaults of Parnassus?

2005-11-07 Thread Erik Max Francis
aum wrote: > The Vaults of Parnassus site: > http://www.vex.net/parnassus/ > has been down for several days, with no resolution available for the > vex.net domain. It's working fine here. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/

Re: What do you use as symbols for Python ?

2005-11-09 Thread Erik Max Francis
pically, in C or C++, I would use an enum for that: > enum OBJECT_STATE > { > opened, closed, error > } OPENED, CLOSED, ERROR = range(3) object.state = OPENED -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA &a

Re: PIL- error message- cannot open libtiff.so.3

2005-11-11 Thread Erik Max Francis
now why it's doing this as I'm trying to > open a JPEG, and not a tiff. I tried with a .bmp with similar results. > Any ideas? Thanks! Install libtiff. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Erik Max Francis
David T wrote: > Individuals, and perhaps groups of individuals are the creators of > works. When someone pays you to create a work, then they own the copyright, not you. It's called work for hire. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone

Re: Copyright [was Re: Python obfuscation]

2005-11-13 Thread Erik Max Francis
Mike Meyer wrote: > Further, recent evidence is that this is no longer true in that > country, assuming it ever was. Oh, please. Take the political crap elsewhere. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA &

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Erik Max Francis
Bruno Desthuilliers wrote: > Depends on the country's laws and the exact agreement. Work for hire is part of the Berne convention. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erik

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Erik Max Francis
ame. Often, in fact, they are not. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Life is painting a picture, not doing a sum. -- Oliver Wendell Holmes, Jr. -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal for adding symbols within Python

2005-11-13 Thread Erik Max Francis
s already easy enough to do this within the language, by just assigning it a value, even if it's an integer from range/xrange or a new sentinel like object(). -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121

Re: Python obfuscation

2005-11-15 Thread Erik Max Francis
have paid you if you didn't (implicitly) transfer the copyright to them. So copyright is just as relevant whether it's a work for hire or not. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM er

Re: best cumulative sum

2005-11-20 Thread Erik Max Francis
Micah Elliott wrote: > On Nov 21, David Isaac wrote: > >> What's the good way to produce a cumulative sum? > >>>> import operator >>>> x = 1,2,3 >>>> reduce(operator.add, x) > 6 Or just sum(x). -- Erik Max Francis && [EMAIL P

Re: join dictionaries using keys from one & values

2005-12-05 Thread Erik Max Francis
ltin method. The usual way is to just wrap a class around two dictionaries, one for mapping keys to values and the other for mapping values back to keys. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W &&a

Re: Usenet falsehoods (was Re: Bitching about the documentation...)

2005-12-05 Thread Erik Max Francis
* taken seriously > using names that aren't what you'd call a "real name". The fact that it obviously isn't always true without exception doesn't mean it's never true. Or did that not occur to you? -- Erik Max Francis && [EMAIL PROTECTED] &

Re: ANN: pygene - genetic algorithms package

2005-12-05 Thread Erik Max Francis
ut it looks like only genetic algorithms are supported, not full genetic programming. Is this not the case? I've been planning on releasing my stack-based genetic programming system Psi (implemented in Python) at some point in the future, FYI. -- Erik Max Francis && [EMAIL PROTE

Re: ANN: pygene - genetic algorithms package

2005-12-06 Thread Erik Max Francis
d in. You can't teach all things simultaneously; I'm not sure creating a genetic programming (or genetic algorithms) system that's useful to "newbies" (whatever that means) is even a useful goal in and of itself. -- Erik Max Francis && [EMAIL PROTECTED] &a

Re: ANN: pygene - genetic algorithms package

2005-12-06 Thread Erik Max Francis
tic algorithm system, not genetic a programming system, hence his response. It was only my interpretation of his introductory comment that led anyone to believe otherwise. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 1

Re: ANN: pygene - genetic algorithms package

2005-12-06 Thread Erik Max Francis
enetic algorithm). Recent developments, with stack-based languages like those used by Spector, have allowed the introduction of types naturally into genetic programming, which has a great deal of promise for allowing even more involves solutions to complex problems. -- Erik Max Francis

Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-06 Thread Erik Max Francis
iquette. ;-) His "points" have about the same legitimacy as banging on the keyboard until it breaks and then crying for an hour. At least if he did that, we'd have to hear from him less. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ Sa

Re: ANN: pygene - genetic algorithms package

2005-12-07 Thread Erik Max Francis
rea. Thanks again for the comments. Sure thing. Obviously I'll post an announcement here when it's ready. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Heaven and

Re: ANN: pygene - genetic algorithms package

2005-12-08 Thread Erik Max Francis
ts), but beyond intermixing ideas they really aren't related. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis I never could have predicted / That I'd feel this way

Re: ANN: pygene - genetic algorithms package

2005-12-08 Thread Erik Max Francis
malv wrote: > Thank you kindly, Erik. Sure thing. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis It is only the poor who are forbidden to beg. -- Anatole France

Re: Proposal: Inline Import

2005-12-09 Thread Erik Max Francis
dead on arrival. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis There's a reason why we / Keep chasing morning -- Sandra St. Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: Notification of PEP Updates

2005-01-07 Thread Erik Max Francis
and edit your settings to select just the 'peps' topic. Maybe someone could roll this into an RSS feed? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis There'

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-07 Thread Erik Max Francis
back of my mind that languages that can easily support massive (especially automatic) parallelization will have their day in the sun, at least someday. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AI

Re: [perl-python] 20050113 looking up syntax

2005-01-14 Thread Erik Max Francis
Peter Hansen wrote: So why duplicate the posts by posting them to the newsgroups? Because he's a well-known pest. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Yes I

ANN: BOTEC 0.3 -- An astrophysical and orbital mechanics calculator

2005-01-15 Thread Erik Max Francis
[since 0.2] - 0.3, 2005 Jan 15. Separate transfers from maneuvers; support Oberth maneuvers. - 0.2.1, 2005 Jan 8. Various collected modifications. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W &&

Re: [perl-python] 20050117, filter, map

2005-01-16 Thread Erik Max Francis
he need to post it here for? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Make it come down / Like molasses rain -- Sandra St. Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: iteritems() and enumerate()

2005-01-19 Thread Erik Max Francis
Xah Lee wrote: Python has iteritems() and enumerate() to be used in for loops. can anyone tell me what these are by themselves, if anything? are they just for idiom? thanks. You would be funnier if you weren't so incompetent. -- Erik Max Francis && [EMAIL PROTECTED] && http:

Re: [perl-python] 20050121 file reading & writing

2005-01-23 Thread Erik Max Francis
memory at once. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Can I lay with you / As your wife -- India Arie -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for Form Feeds

2005-01-24 Thread Erik Max Francis
;= 0: ... If you want to keep a running count, you can use .count, which will count the number of substrings in the line. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis I would have liked to have seen Montana. -- Capt. Vasily Borodin -- http://mail.python.org/mailman/listinfo/python-list

Re: The next Xah-lee post contest

2005-01-31 Thread Erik Max Francis
Steve Holden wrote: Would there, I wonder, be any enthusiasm for a "Best Xah Lee impression" prize at PyCon? I imagine standing in a corner, facing the wall, and screaming incoherently at the top of your lungs would be guaranteed at least second place. -- Erik Max Francis &&

Re: [perl-python] string pattern matching

2005-02-01 Thread Erik Max Francis
someone finding his posts and not seeing the related discussion and refutations is a big risk. For the rest of us, we can just killfile the threads easily enough. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W

Re: [perl-python] string pattern matching

2005-02-01 Thread Erik Max Francis
already being handled, at low levels of annoyance that can be avoided by anyone with a killfile or mail filter. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Divorces are made

Re: How do you do arrays

2005-02-01 Thread Erik Max Francis
. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis War is like love, it always finds a way. -- Bertolt Brecht -- http://mail.python.org/mailman/listinfo/python-list

Re: Python choice of database

2005-06-20 Thread Erik Max Francis
, I thought of using shelve, but looking at > the restrictions (record size + potential collisions) I feel I should study > my options a bit further before I get started. Why not just use native Python data structures and pickle them? -- Erik Max Francis && [EMAIL PROTECTED] &&a

Re: Python choice of database

2005-06-20 Thread Erik Max Francis
Philippe C. Martin wrote: > Well that would be shelve I guess ... with the restrictions I mentioned. I was talking about pickle, not shelve. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && A

Re: Python choice of database

2005-06-20 Thread Erik Max Francis
Philippe C. Martin wrote: > You mean pickling a dictionnary of 5000/16K objects ? Yes. You said speed was not an issue; pickling only 5000 objects, each no more than 16 kB, is easily handled by any remotely modern machine (and even plenty which are not very modern). -- Erik Max Fran

Pickling limitation with instances defining __cmp__/__hash__?

2005-06-27 Thread Erik Max Francis
to this limitation, short of reworking things so that these self-referenced objects aren't used as dictionary keys? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis You'll learn / Life is worth it / Watch the tables turn -- TLC -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary to tuple

2005-06-28 Thread Erik Max Francis
bruno modulix wrote: > Err... don't you spot any useless code here ?-) > > (tip: dict.items() already returns a list of (k,v) tuples...) But it doesn't return a tuple of them. Which is what the tuple call there does. -- Erik Max Francis && [EMAIL PROTECTED] &a

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Erik Max Francis
same sort of thing which Brits try and imitate when > they want to suggest a snake-oil salesman. And due to overcorrection, typically do a really bad job of it :-). -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Erik Max Francis
s, so you shouldn't have any problem finding something both you and the kids can use, like UCBLogo for Unix or MSWLogo for Windows (based on UCBLogo). If you want to go that route, there's even a set of computer science texts based on Logo, called _Computer Science Logo Style_ by Bria

Re: Favorite non-python language trick?

2005-06-30 Thread Erik Max Francis
ncf wrote: > Eh, just figured it'd be worth noting...map, filter, and reduce should > be possible with the extended list syntaxes. Well, filter I know is, > but hte others /should/ be possible. > > filter(lambda: <>, <>) > [some_var for some_var in <> if

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Erik Max Francis
before I found Python. I definitely use lambda, map, filter, and reduce, and will miss them when they're gone. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Heaven

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-07-01 Thread Erik Max Francis
The distinction is rhotic vs. non-rhotic accents, by the way; non-rhotic accents drop the _r_s. The latter example is usually an example of overcorrection. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W &a

Re: Accepted Summer of Code proposals

2005-07-01 Thread Erik Max Francis
ul projects got approved. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Heaven ne'er helps the man who will not act. -- Sophocles -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Erik Max Francis
Sean McIlroy wrote: > if that's the case then list > comprehensions and/or "first class functions" are likely to be the next > target. Slippery slope arguments are logical fallacies, you know. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyo

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-02 Thread Erik Max Francis
in fact it's quite clear). So at least there's something to that, but I don't follow it the whole way. But removing reduce is just removing functionality for no other reason, it seems, than spite. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Erik Max Francis
nce) vs. [str(x) for x in sequence] -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis In Heaven all the interesting people are missing. -- Friedrich Nietzsche -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Erik Max Francis
g the reasons for removing them as builtins, I really can't understand the motivation for removing them entirely, not even as a standard library module. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 5

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Erik Max Francis
oduct fulfill 90% (estimate of course) of reduces > use cases. It may actually be as high as 99% for all I know. Or it may > be less. Anyone care to try and put a real measurement on it? Well, reduce covers 100% of them, and it's one function, and it's already there. --

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Erik Max Francis
t handles all the required use cases and replacing it with _two_ functions that don't. Since it's doubling the footprint of the reduce functionality, arguments about avoiding pollution are red herrings. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/

  1   2   3   4   5   6   >