Re: Puzzled by "is"

2007-08-09 Thread Erik Max Francis
ntinel object (e.g., `mySentinel = object()`), because that is the only time you actually _are_ interested in identity. All other times you are not really interested in identity. Sample code as above is essentially showing unimportant implementation details that should never concern you.

Re: Puzzled by "is"

2007-08-09 Thread Erik Max Francis
of large tuples can be expensive). Admittedly the empty > tuple is a special case but then 'Special cases aren't special enough to > break the rules'. > > A bit odd. It doesn't save time if you have to check through all the existing tuples for matches ... -- Erik Max

Re: Puzzled by "is"

2007-08-09 Thread Erik Max Francis
e user (that's you and > I) should *not* expect any particular behaviour to hold between > different implementations. Right. In the terminology of language standards, it is implementation defined. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/

Fatest standard way to sum bytes (and their squares)?

2007-08-12 Thread Erik Max Francis
loop, but since it's going to be processing massive amounts of data, the faster the better. Are there any tricks I'm not thinking of, or perhaps helper functions in other modules that I'm not thinking of? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcy

Re: Fastest standard way to sum bytes (and their squares)?

2007-08-12 Thread Erik Max Francis
And of course I meant fastest, not "fatest." Fattest wouldn't be good, either. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis Whoever named it necking w

Re: Fatest standard way to sum bytes (and their squares)?

2007-08-12 Thread Erik Max Francis
the sums as ints/longs to avoid losing precision, so converting to floating point isn't an optional. (The sums are normalized by the sizes of the files and expanded to 32 bits in order to maximize precision.) -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.co

Re: Fatest standard way to sum bytes (and their squares)?

2007-08-12 Thread Erik Max Francis
appear to work quite as dramatically well for me with strings instead of lists, but it certainly is an improvement. > Of course, that optimization doesn't work for the squared sum; using a > lambda only pessimizes it. Right. -- Erik Max Francis && [EMAIL PROTECTED] &

Re: Fatest standard way to sum bytes (and their squares)?

2007-08-12 Thread Erik Max Francis
unt) > ordinalSumSquared = sum(ord(c)**2 * count[c] for c in count) This approach is definitely faster than using a generator in my tests, and was second fastest overall. I'm actually a bit surprised that it's as fast as it is; it never would have occurred to me to try it this wa

Re: Fatest standard way to sum bytes (and their squares)?

2007-08-12 Thread Erik Max Francis
l the next day, but got a factor of two speedup within half an hour! -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis It is morale that wins the victory. -- Gen. George C. Marshall -- http://mail.python.org/mailman/listinfo/python-list

Re: negative polar axis

2007-08-13 Thread Erik Max Francis
negative. The usual translation from polar to Cartesian coordinates makes this meaningful, albeit weird, so in effect the resulting positions are just reflections around the origin. Which I suppose is what the original poster was asking about, but it's still not clear. -- Erik Max Fra

Re: about negative polar plots

2007-08-14 Thread Erik Max Francis
u're going to have to give more information about what you're doing, what you're using to do it, and where it's giving you unexpected or undesired results if you want help solving your problem. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/ma

Re: Retry: Question about FutureWarning

2007-08-14 Thread Erik Max Francis
6, 17:16:11) [GCC 3.2.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 0x 4294967295L -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis Black vinyl man with black plasticized imagination -- Nik Kershaw -- http://mail.python.org/mailman/listinfo/python-list

Re: Python question (PyNoob)

2007-08-19 Thread Erik Max Francis
uch tasks would be your ability to manipulate them and write your own. If tools already exist that do what you need, which languages they were written in would be completely irrelevant. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA &

Re: beginner, idiomatic python

2007-08-23 Thread Erik Max Francis
ith a list, then the sets-difference-and-then-make-a-list mechanism is appropriate. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis It [freedom] must be demanded by the oppressed. -- Dr. Martin Luther King, Jr. -- http://mail.python.org/mailman/listinfo/python-list

Re: Haskell like (c:cs) syntax

2007-08-29 Thread Erik Max Francis
assigning mutates the sequence. Slicing alone returns a copy. >>> L = ['one', 'two', 'three', 'four', 'five'] >>> x = L[1:] # grab a slice >>> x[:] = [] # mutate it >>> x [] >>> L # original li

Re: list index()

2007-08-31 Thread Erik Max Francis
t; towards the back of my mouth. Native English accents vary as well, but _roll_ rhymes with _troll_, not _trawl_. _Trawl_ would rhyme with _fall_, and _fall_ definitely doesn't rhyme with _roll_. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San

Re: list index()

2007-08-31 Thread Erik Max Francis
t; sound in any accent I've ever heard of. Which you pronounce _boat_ and _bot_ the same way, too? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis There are no dul

Re: How best to dynamically define methods (and functions)?

2007-09-01 Thread Erik Max Francis
;, ...] for method in methods: setattr(MyClass, method, lambda *x: Node(method, *x)) The first argument here will be the implicit self, if you don't want that, strip off the first argument (or use lambda self, *x: ...). -- Erik Max Francis && [EMAIL PROTECTED] &

Re: How best to dynamically define methods (and functions)?

2007-09-01 Thread Erik Max Francis
Erik Max Francis wrote: > Something like:: > > method = ['fun', ...] > for method in methods: > setattr(MyClass, method, lambda *x: Node(method, *x)) Err, that first line was supposed to be methods = ... -- Erik Max Francis && [EMAIL PROTECT

Re: Python is overtaking Perl

2007-09-03 Thread Erik Max Francis
Asun Friere wrote: > How do you figure that? Isn't the chart showing the frequency of > those particular terms combined as a fraction of the total search > volume on Google? Who knows? The graph has no labeling or calibration for the y-axis, so it's meaningless. -

Re: why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

2007-03-21 Thread Erik Max Francis
programming language design. Excessive and needless verbosity is one thing; but saving keystrokes for its own sake is not a priority and never should be. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis I am not afraid / To be a lone Bohemian -- Lamya -- http://mail.python.org/mailman/listinfo/python-list

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-22 Thread Erik Max Francis
since Io makes no such requirements. The attribute and method (not made distinct in Io; they're called "slots") is much the same as with Python; the current instance is checked for the object, then its parents, then _its_ parents, and so on. -- Erik Max Francis && [EMA

Re: Order of tuples in dict.items()

2007-10-14 Thread Erik Max Francis
hat), but I wouldn't take the chance and rely on such an implementation detail. If you want to keep track of the order in which objects were added to a dictionary, you'll need to keep a separate list of (sorted) keys, which is easy enough. If you're lazy there are plenty of

Re: if..else stmt

2007-10-22 Thread Erik Max Francis
g wrong. Without seeing actual code, it's impossible to say what. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis So little time, so little to do. -- Oscar Lev

Re: Overloading assignment operator

2007-01-23 Thread Erik Max Francis
elf, x): ... self.x = x ... def __mul__(self, other): ... return C(self.x*other.x) ... >>> result = C(2)*C(3) >>> print result <__main__.C instance at 0x402e13ec> >>> result.x 6 -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.

Re: how to "free" an object/var ?

2007-02-01 Thread Erik Max Francis
our M's and a silent Q like the famous > author Farles Wickens *wink* "I knew a guy whose first name was Ed. He was so cool, he spelled it with a hyphen." -- George Carlin -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA,

Re: Running long script in the background

2007-02-06 Thread Erik Max Francis
ees if the job has completed -- showing the results if it has -- or refreshes periodically if it hasn't yet. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis You coul

Re: Running long script in the background

2007-02-06 Thread Erik Max Francis
7;t show anything until the entire process > is complete and it's just a bunch of echo statements in a for loop, > I'm not sure why they behave differently. In a word: buffering. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA

Re: eval('000052') = 42?

2007-02-20 Thread Erik Max Francis
unwise. Instead use int: >>> int('00052') 52 -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis God grant me to contend with those that understand me

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Erik Max Francis
when it reaches the surface of Mars. It was units of momentum that were inappropriately compared, actually. (And it broke up before hitting the ground, but that's a minor quibble.) -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, US

Re: md5 wrongness?

2007-11-23 Thread Erik Max Francis
;credits" or "license" for more information. >>>> import md5 >>>> s = md5.new() >>>> s.update('snagglefrob') >>>> s.hexdigest() > '9eb2459fcdd9f9b8a9fef7348bcac933' echo inserts a newline, your Python snippet doesn

Re: Disk Space Script

2007-11-24 Thread Erik Max Francis
popen, or one of the more involved popen... modules, and then parse it however you like. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Who'd ever think it / Such

Re: Why does __builtins__ mean different things...

2007-12-21 Thread Erik Max Francis
et unpredictable behavior, you just get different behavior you didn't expect, which is not the same thing. Python is a programming language, like any other; randomly dropping letters in names is going to result in bad behavior, so be more careful about it. -- Erik Max Francis && [EMAI

Re: test for None

2006-04-18 Thread Erik Max Francis
ne" > ... else: > ... print "X is not None" > ... No, because you're iterating over an empty list, which does nothing: >>> for x in []: print 'hi' ... >>> -- Erik Max Francis && [EMAIL PROTECTED] &&a

Re: Non-web-based templating system

2006-04-28 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Thanks, it looks like empy is what I need. :-) -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis The object of war is not to die for your country b

Re: Non-web-based templating system

2006-04-28 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Actually, that looks even better that EmPy for what I need. :-( -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis All bad poetry springs from

Re: Python "member of" function

2006-04-29 Thread Erik Max Francis
ng pages for "python in" does not reveal very many relevant > sources. Yes, `in` is the relevant operator. It's quite simple to use: >>> a = [1, 4, 9, 16, 25] >>> 2 in a False >>> 4 in a True If you're having problems using it in some circumstan

Re: Tuple assignment and generators?

2006-05-05 Thread Erik Max Francis
vdrab wrote: > what the...? > does anybody else get mighty uncomfortable about this? No. Why should you ever care about whether two integers representing values are the same object? Your tests should be with `==`, not `is`. -- Erik Max Francis && [EMAIL PROT

Re: python rounding problem.

2006-05-07 Thread Erik Max Francis
do that? Floating point arithmetic is inherently imprecise. This is not a Python problem. If you want to print it to only three digits, then use something like:: >>> '%.3f' % 2.9954254 '2.995' -- Erik Max Francis && [EMAIL PROTECTED] && http

Re: Why list.sort() don't return the list reference instead of None?

2006-05-07 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > L = [4,3,2,1] > L=L.sort() > L will refer to None, why L.sort() don't return the L? > I want to ask why the designer of Python do so? Because that's the convention that signifies that a Python method mutates the object rather than returns a

Re: Question about exausted iterators

2006-05-18 Thread Erik Max Francis
y choosing to ask in such a way that guarantees practically no one will take your suggestion seriously. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Chance favo

Re: Why does the _winreg module start with an underscore

2006-05-19 Thread Erik Max Francis
as such you probably shouldn't use it or rely on it, unless you know the internal details very well. An identifier starting with _two_ underscores is automatically mangled in a way that makes it more difficult (but not impossible) for external clients to accidentally use them. -- Erik Max

Re: Includeing Python in text files

2006-05-22 Thread Erik Max Francis
like php or > embedded perl. > > So my little toy works not bad, but I was wondering if such a feature > already existed, if yes, can you point me out some links? Another standalone templating system is EmPy: http://www.alcyone.com/software/empy/ -- Erik Max Francis &&

Re: John Bokma harassment

2006-05-24 Thread Erik Max Francis
y were cutting you off unfairly? The alternative is that you're not surprised by this action and are simply trying to spin things in your favor. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W

Re: how to clear up a List in python?

2006-05-26 Thread Erik Max Francis
#x27;re > posted this on purpose, you really need to grow up.'''. > > The problem was I did post it on purpose, but not with the intent to > mess anyone up over it. His statement was a conditional. Since you're saying that the conditional does not apply, then

Re: os.tmpfile()

2008-01-01 Thread Erik Max Francis
n-line. It's a file. You read strings from it and write strings to it. It isn't a string itself. Given that what you're trying to do doesn't make any sense, it's hard to know where to begin to identify what's confusing you. -- Erik Max Francis && [EMAIL

Re: os.tmpfile()

2008-01-02 Thread Erik Max Francis
t; would automatically delete itself when the code was finished. It is more likely that keeping it in a list will be more efficient, and easier to handle anyway. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57

Re: dictionary/hash and '1' versus 1

2008-01-04 Thread Erik Max Francis
he best bet so far. If you want to make sure something is always done in a particular situation, then solution is to have a function or method that does that, and then just call that function or method. That's true in any language -- any one that has functions, anyway. -- Erik Max Francis

Re: Embedding python code into text document question.

2008-01-10 Thread Erik Max Francis
s? Any help will be appreciated :) What you're looking for is a templating system for Python. There are already many with varying degrees of complexity and emphasis, including one I've put together, EmPy: http://www.alcyone.com/software/empy/ For more, google around for Py

Re: Newbie question on Classes

2008-01-10 Thread Erik Max Francis
class for elegance, but it's not required to get the proper functionality. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Life is a gamble so I should / Live life more carefully -- TLC -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not a Python compiler?

2008-02-07 Thread Erik Max Francis
Any after-the-fact explanation of why the error was present (but not corrected or pointed out in the movie) is just so much rationalization. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AI

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Jeff Schwab wrote: > Erik Max Francis wrote: >> Robert Bossy wrote: >>> I'm pretty sure we can still hear educated people say that free fall >>> speed depends on the weight of the object without realizing it's a >>> double mistake. >> >&

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Modern physics can get weird and spooky and counterintuitive, but any real connection made with Eastern philosophy is only in the eye of the beholder. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W &&

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
wavicals, > it's just that the wave-like fuzziness is usually too small to notice. It's usually spelled _wavicle_, by the way. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikm

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
s out of impetus, then falls straight down -- is clearly contrary to everyday experience of watching two people throw a ball back and forth from a distance, since the path of the ball is clearly curved. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.co

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
27;s only when you're dealing with objects falling through vacuum that all objects fall at the same rate, and that's because the gravitational and inertial masses are identical. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, C

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Jeff Schwab wrote: > Erik Max Francis wrote: >> Grant Edwards wrote: >> >>> On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: >>>> Fair enough! >>> >>> Dear me, what's Usenet coming to these days... >> >> I know, rea

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Grant Edwards wrote: > On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Fair enough! > > Dear me, what's Usenet coming to these days... I know, really. Sheesh! Jeff, I won't stand for that! Argue with me! :-) -- Erik Max Francis && [EMAIL P

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
even reasonable people into demonstrating technical ignorance have precisely the same problem: The desired technical context is not made clear and so that the supposedly-wrong answer is not only unsurprising, but often arguably correct. This kind of stuff is little more than a s

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Erik Max Francis
ach physics than this, because these misunderstanding are not wrong in any meaningfully useful way. -- 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 isn't importa

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Erik Max Francis
Dennis Lee Bieber wrote: > On Tue, 12 Feb 2008 00:18:38 -0800, Erik Max Francis <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> equivalence for everyday usage and make no requirement of using the >> "proper" units for mass (kg) vs.

Re: Double underscore names

2008-02-12 Thread Erik Max Francis
ethod. > Go ahead and implement your protocol using attributes with plain > names. What makes it a protocol is that it's likely to be generally > applicable, and the names are chosen to apply to other classes equally > well. Agreed. -- Erik Max Francis && [EMAIL PROTECTED]

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Erik Max Francis
greg wrote: > Erik Max Francis wrote: >> My point was, and still is, that if this question without further >> context is posed to a generally educated laymen, the supposedly wrong >> answer that was given is actually _correct_. > > Except that they probably don&#

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Erik Max Francis
systems for dealing with the pound and its brethren, and different people are taught different things and are perpetually confused. And not much good comes of it. And the rest of us just use SI. (And if you bring up the _kilogram-force_, I'll just cry.) -- Erik Max Francis &

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-13 Thread Erik Max Francis
Dotan Cohen wrote: > On 13/02/2008, Erik Max Francis <[EMAIL PROTECTED]> wrote: >> And the rest of us just use SI. (And if you bring up the >> _kilogram-force_, I'll just cry.) > > Don't cry, I just want to say that I've hated the kilogram-force &

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-13 Thread Erik Max Francis
I V wrote: > On Mon, 11 Feb 2008 14:07:49 -0800, Erik Max Francis wrote: >> experience. The notion of impetus -- where an object throw moves in a >> straight line until it runs out of impetus, then falls straight down -- >> is clearly contrary to everyday experience of watc

Re: OT: Speed of light

2008-02-13 Thread Erik Max Francis
ecific impulse) is measured in seconds, as it's the ratio of the the thrust (force) to rate of fuel usage (would be mass divided by time, but weight on Earth is used instead of mass). Basically, physics rationalizations of Imperial/English/American (whatever you choose to call

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-13 Thread Erik Max Francis
on due to gravity is a pound. The acceleration due to gravity is only approximately 32 ft/s^2, so you were just remembering the short-hand approximation for 1 gee. Let's hear it for incoherent unit systems ... -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/m

Re: OT: Speed of light

2008-02-13 Thread Erik Max Francis
for it) zepto-. The electron-volt is about 160 zJ (zeptojoules). -- 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 are the lovers rock / The rock that I cling to -- Sade -- http://mail.python.org/mailman/listinfo/python-list

Re: Seemingly odd 'is' comparison.

2008-02-18 Thread Erik Max Francis
Tobiah wrote: >>>> print float(3.0) is float(3.0) > True >>>> print float(3.0 * 1.0) is float(3.0) > False >>>> It's implementation dependent what values these expressions will take. If you're trying to test equality, use `==`, not `is`

Re: Double underscores -- ugly?

2008-02-19 Thread Erik Max Francis
or something? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis One cannot always be a hero, but one can always be a man. -- Goethe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IRC Zork

2008-02-28 Thread Erik Max Francis
ed on for my own amusement a while back but never got far enough to do anything useful at all, given the size of the task. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis

Re: Pythons & Ladders

2008-02-28 Thread Erik Max Francis
then C is a > good choice. More portable than assembler but nearly as close to the > metal. > > To the OP: If you try C++, don't hold that crappy language against C#, D, > or Java. ;-) He was talking about C++, not C. Jeff has quite a good point; teaching C++ as C is not terribly

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Erik Max Francis
l. No, of course not, since logically you must think all software is useless. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Life is a zoo in a jungle. -- Peter de Vries -- http://mail.python.org/mailman/listinfo/python-list

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Erik Max Francis
Mensanator wrote: > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: >> Mensanator wrote: >>> I'm not hard to please at all. >> No, of course not, since logically you must think all software is useless. > > Somehow, I expected bet

Re: Looking for very light weight template library (not framework)

2008-03-06 Thread Erik Max Francis
>>> print em.expand(myOutput, globals()) The total cost is $123.45. This order will be shipped to Jack McCoy at the following address: 1 Police Plaza New York City, NY This order was generated at Thu Mar 6 18:41:58 2008 -- 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's a reason why we / Keep chasing morning -- Sandra St. Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: List mutation method gotcha - How well known?

2008-03-13 Thread Erik Max Francis
Chris wrote: > No output because x is a NoneType... That's behavior of the interactive interpreter when printing results of expressions, not of print. It will print None. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA &

Re: getattr(foo, 'foobar') not the same as foo.foobar?

2008-03-13 Thread Erik Max Francis
re not doing a useful test here. In Python, bound methods are dynamically generated. -- 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 is no present or future; only the pa

Re: 'join' in the wrong word for the method in class Thread.

2008-03-15 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > 'join' in the wrong word for the method in class Thread. That's the standard term in threading. If it's not familiar to you, well, bummer, but there's not much more that can be done about that than for you to read the literature. --

Re: English-like Python

2009-01-15 Thread Erik Max Francis
ional 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 && [email protected] && http://www.alcyone.com/max/ S

Re: English-like Python

2009-01-16 Thread Erik Max Francis
alex23 wrote: On Jan 16, 5:39 pm, Erik Max Francis 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 to type, This

Re: English-like Python

2009-01-20 Thread Erik Max Francis
x27;t require parentheses at all, since functions ("procedures") take a fixed number of arguments. Parentheses are only required when you're adding optional arguments. -- Erik Max Francis && [email protected] && http://www.alcyone.com/max/ San Jose, CA, USA &

Re: Function arguments

2009-01-26 Thread Erik Max Francis
have 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'

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 && [email protected] && http://www.

Re: "Byte" type?

2009-02-14 Thread Erik Max Francis
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 && [email protected] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Did you ever love somebody / Did you ever really care -- Cassandra Wilson -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Erik Max Francis
ime for the same reason. It isn't going to happen. -- 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

Re: Guido's new method definition idea

2008-12-06 Thread Erik Max Francis
7;t. Is "@" a "speaking identifier? How 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

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_? -- Eri

Re: Removing None objects from a sequence

2008-12-12 Thread Erik Max Francis
that matter. -- Erik Max Francis && [email protected] && 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: why cannot assign to function call

2008-12-28 Thread Erik Max Francis
nature, but why 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...@al

Re: why cannot assign to function call

2009-01-02 Thread Erik Max Francis
iously doesn't say anything about which "objects" are the same as each other. -- Erik Max Francis && [email protected] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Scars are like memories. We d

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): ≡

Re: why cannot assign to function call

2009-01-05 Thread Erik Max Francis
dentity and the computer scientific ones (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

Re: why cannot assign to function call

2009-01-07 Thread Erik Max Francis
ed, 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 && [email protected] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis All delays are dangerous in war. -- John Dryden, 1631-1700 -- http://mail.python.org/mailman/listinfo/python-list

Re: type-checking support in Python?

2008-10-07 Thread Erik Max Francis
make two widgets, how many widgets can 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

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Erik Max Francis
not so good one. People like Python 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 && [EMA

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

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

2009-03-27 Thread Erik Max Francis
(non-spam) 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 &

Re: iterator question

2009-04-02 Thread Erik Max Francis
rating over a single object, so successive calls to .next give you success iteration values like you intended. -- 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 must all

Re: Marshal vs pickle...

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

<    4   5   6   7   8   9   10   11   >