CentOS 6.5 / SPEC file

2014-03-27 Thread Devin
am trying. Is there a good website that contains maybe a more correct version of the SPEC file for CentOS 6.x? Any help would be greatly appreciated. Devin Acosta -- https://mail.python.org/mailman/listinfo/python-list

sharding research with pyshards

2008-05-29 Thread Devin
http://code.google.com/p/pyshards/ Devin Venable -- http://mail.python.org/mailman/listinfo/python-list

"Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Devin
So Python can have unicode variable names but you can't "explode" (**myvariable) a dict with unicode keys? WTF? -Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Devin
On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > "Martin v. Löwis" wrote: > > Devin wrote: > >> So Python can have unicode variable names but you can't > >> "explode" (**myvariable) a dict with unicode keys? WTF? > > >

Re: "Exploding" (**myvariable) a dict with unicode keys

2008-10-03 Thread Devin
On Oct 3, 2:29 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Devin wrote: > > On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > >> "Martin v. Löwis" wrote: > >>> Devin wrote: > >>>> So Python can have uni

Re: Python for philosophers

2013-05-12 Thread Devin Jeanpierre
iss, let me hasten to add (to the OP -- Citizen Kant) > > A noble aim, but I have a feeling that "Citizen Kant" is version 2.0 of > 8 Dihedral. > > Of course, I could be wrong. Without benefit of the doubt, kindness is impossible. I would suggest giving newcomers at

Re: Utility to locate errors in regular expressions

2013-05-24 Thread Devin Jeanpierre
a different character/subexpression for each branch. And then there's exponentially many possible branches. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Heisenbugs? (was: Re: PyWart: The problem with "print")

2013-06-03 Thread Devin Jeanpierre
"pure python" in that Python doesn't even guarantee __del__ is ever called at all, let alone why. It's completely implementation-specific, and not a property of Python the language. -- Devin .. [*] Some people use it as an "unreliable fallback"; this turns their magic

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Devin Jeanpierre
es from a tradition where this behavior is not astonishing. Languages do not exist in a vacuum. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Devin Jeanpierre
x27;s not to say that the entire approach is invalid and that we should ignore how Haskell informs the PL discourse. For some reason both the Python and Haskell communities feel the other is foolish and ignorant, dismissing their opinions as unimportant babbling. I wish that would stop. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Conditional decoration

2012-06-18 Thread Devin Jeanpierre
d(...): ... if condition: decorated = decorator1(decorator2(decorated)) -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-25 Thread Devin Jeanpierre
ectify once the need for > backward compatibility was relaxed. Hmmm, why is the function so much better than the statement? You like using it in expressions? Or is it that you like passing it in as a callback? -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Devin Jeanpierre
sers' lives easier. The question should probably be where developer effort is best spent, not where developers spend the least effort. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: code review

2012-07-01 Thread Devin Jeanpierre
fied Algebra: http://www.cs.toronto.edu/~hehner/UA.pdf (although, he himself doesn't specify it as being one or the other, so by default one would assume 'a < b < c' to be nonsensical.) -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: code review

2012-07-01 Thread Devin Jeanpierre
On Sun, Jul 1, 2012 at 8:41 PM, Steven D'Aprano wrote: > On Sun, 01 Jul 2012 05:18:09 -0400, Devin Jeanpierre wrote: > Sheesh guys. Don't go hunting through the most obscure corners of > mathematics for examples of computer scientists who have invented their > own maths not

Re: code review

2012-07-01 Thread Devin Jeanpierre
where this comes into play is the ** operator, which is right-associative but still has a left-to-right evaluation order. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: adding a simulation mode

2012-07-04 Thread Devin Jeanpierre
See: - http://washort.twistedmatrix.com/2011/01/introducing-exocet.html - http://washort.twistedmatrix.com/2011/03/exocet-second-look.html -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: simpler increment of time values?

2012-07-04 Thread Devin Jeanpierre
magine that under these constraints the answers are always 0:45 and 23:45 respectively. Although I guess it doesn't hurt to check. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: 2 + 2 = 5

2012-07-05 Thread Devin Jeanpierre
On Thu, Jul 5, 2012 at 10:34 AM, Laszlo Nagy wrote: >>>> 5+1 > 4 4 + 1 is 5 is 4. (e.g. try 2+3 as well). -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: API design question for dbf.py

2012-07-06 Thread Devin Jeanpierre
On Fri, Jul 6, 2012 at 6:46 PM, Ethan Furman wrote: > It's checking for equality, not identity. >>> x = float('nan') >>> x in [x] True It's checking for equality OR identity. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: why greenlet, gevent or the stackless are needed?

2012-07-07 Thread Devin Jeanpierre
s real threads or greenlet or whatever are involved, of course.) -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Interview Questions

2012-07-09 Thread Devin Jeanpierre
oe is the poor college grad, who wants to appear like a well-rounded individual and lists capoeira and gardening, instead. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit conversion to boolean in if and while statements

2012-07-15 Thread Devin Jeanpierre
now, the only use of having a polymorphic boolean conversion is reducing the amount of typing we do. Generally objects with otherwise different interfaces are not interchangeable just because they can be converted to booleans, so you wouldn't lose much by being forced to explicitly convert to

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Devin Jeanpierre
On Mon, Jul 16, 2012 at 12:03 AM, Steven D'Aprano wrote: > On Sun, 15 Jul 2012 22:15:13 -0400, Devin Jeanpierre wrote: > >> For example, instead of "if stack:" or "if bool(stack):", we could use >> "if stack.isempty():". This line tells us ex

Re: Implicit conversion to boolean in if and while statements

2012-07-17 Thread Devin Jeanpierre
ill ignoring what I actually said. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation, inheritance and polymorphism

2012-07-17 Thread Devin Jeanpierre
e name "foo", as long as it has a read method that takes no parameters. This could be a file-like object, but it could also be something completely different that just happens to have a method by the same name. > Is there a previous discussion in the group that I could read. Man, I

Re: Encapsulation, inheritance and polymorphism

2012-07-17 Thread Devin Jeanpierre
instead of using obj < other, and your methods only work on objects (that support the comparable interface). Otherwise, no different than Python, I guess. Would Java not be a type-bondage language if everything was an object? -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Devin Jeanpierre
e! The term is agnostic as to what the temperature of the universe will be. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: can someone teach me this?

2012-07-21 Thread Devin Jeanpierre
On Fri, Jul 20, 2012 at 11:15 PM, hamilton wrote: > You are an idiot, or a scammer. Please be nice. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Devin Jeanpierre
believe too much in Google's righteousness. They are both big companies that don't necessarily care about you. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Devin Jeanpierre
just measurement error, the difference is insignificant. It's probably real. For if-else, the true case needs to make a jump before it returns, but for if-return, there's no jump and the return is inlined. -- Devin > So, don't worry about which is faster. Write whichever is more

Re: default repr?

2012-07-22 Thread Devin Jeanpierre
heir arguments and do code with them. Duck typing and all. > I stand corrected, then. On Python 3 you are correct. >>> class A: ... def print(self): ... print(self) ... >>> A.print(2) 2 -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: A thread import problem

2012-07-22 Thread Devin Jeanpierre
ifferent process, which could handle RPC invocations asynchronously, and sending remote invocations via a synchronous RPC library in the parent process. Maybe you can do something similar in your case? -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: python package confusion

2012-07-23 Thread Devin Jeanpierre
ge contain the line "fib(1000)", so you pasted the wrong files. > I also have an empty file __init__.py in the mods directory This only matters if you want to "import mods". -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: the meaning of rユ.......ï¾

2012-07-23 Thread Devin Jeanpierre
ot;I"s I just > happened to pull out randomly you need to chose and how to get it? What > about Ȝ vs ȝ? Or Ȣ vs ȣ? Or ȸ vs ȹ? Or d vs Ԁ vs ԁ vs ԃ vs Ԃ? Or ց vs g? > Or ս vs u? Yes, as soon as we add unicode to anything everyone will go insane and write gibberish. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: the meaning of rユ.......ï¾

2012-07-23 Thread Devin Jeanpierre
some American will stroll in and be confused. (It is my understanding that, in any case, many non-English companies do their coding in English. That doesn't mean it's a general rule that should be forced on everyone.) -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Gender, Representativeness and Reputation in StackOverflow

2012-07-23 Thread Devin Jeanpierre
ople to do better? /me has been paying too much attention to the Elsevier boycott -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: What's wrong with this code?

2012-07-24 Thread Devin Jeanpierre
rly synonymous when one talks about Python (and both are used in the language reference). I mean, what's so "strict" about the way you're speaking? -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: python package confusion

2012-07-24 Thread Devin Jeanpierre
n is reading commands from stdin, or if Python was run with the -c option, or maybe some other situations. It doesn't do it if you just run a program, as in "python myfile.py". -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: the meaning of rユ.......ï¾

2012-07-24 Thread Devin Jeanpierre
Here in Canada we celebrate Tau day. -- Devin (... I wish.) -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-25 Thread Devin Jeanpierre
On Wed, Jul 25, 2012 at 4:40 AM, Ulrich Eckhardt wrote: > What do you think? retort: def foo(): None -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-25 Thread Devin Jeanpierre
;m > wrong! True. But it might be nice to use pass both in lambdas and regular functions, or to use pass as a variable name. (Unfortunately, these two niceties are somewhat in conflict.) -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-25 Thread Devin Jeanpierre
On Wed, Jul 25, 2012 at 2:14 PM, Ian Kelly wrote: > You can already use pass (or the equivalent) in a lambda. > > lambda: None This lacks my foolish consistency. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-26 Thread Devin Jeanpierre
ent that could actually be turned into a function, raise. None of the rest could in Python (except class), and one of the rest couldn't in any language (def). -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-26 Thread Devin Jeanpierre
; Well, if/while/for could be functions. So could with, probably. Now, > def would be a little tricky... In Haskell, sure. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

PyCon for students?

2012-07-27 Thread Devin Jeanpierre
t for teachers and such, who have the same schedule as students), but for students it's the difference between missing a week of school (or, worse, exams), and being able to do whatever because it's the summer vacation. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question : gedit as an ide

2012-09-16 Thread Devin Jeanpierre
ct, one of gedit's main advantages over many of its similar competitors (in particular I'm thinking of Kate) is that the plugin support is very strong, so if it doesn't do what you want, you can make it do what you want anyway. So, install / enable plugins. Lots of them. Or use an edit

Re: Java singletonMap in Python

2012-09-24 Thread Devin Jeanpierre
nd so on. In this case, a singleton map is a map with only one key-value pair, such as {a:b}. The singleton design antipattern is not relevant here. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Article on the future of Python

2012-09-27 Thread Devin Jeanpierre
On Thu, Sep 27, 2012 at 2:13 AM, Steven D'Aprano wrote: > On Tue, 25 Sep 2012 09:15:00 +0100, Mark Lawrence wrote: > And a response: > > http://data.geek.nz/python-is-doing-just-fine Summary of that article: "Sure, you have all these legitimate concerns, but look, cak

Re: #python archives?

2012-09-27 Thread Devin Jeanpierre
. As evidence to this, a certain anti-logging freenode user hasn't pestered #python ever since the last logging bot was banned (because of unrelated reasons). Is there any particular reason you want the logs? -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Article on the future of Python

2012-09-27 Thread Devin Jeanpierre
On Thu, Sep 27, 2012 at 10:25 AM, Steven D'Aprano wrote: > On Thu, 27 Sep 2012 08:11:13 -0400, Devin Jeanpierre wrote: > >> On Thu, Sep 27, 2012 at 2:13 AM, Steven D'Aprano >> wrote: >>> On Tue, 25 Sep 2012 09:15:00 +0100, Mark Lawrence wrote: And a >

Re: Article on the future of Python

2012-09-27 Thread Devin Jeanpierre
On Thu, Sep 27, 2012 at 12:45 PM, Mark Lawrence wrote: > The article Steven D'Aprano referred to is not a direct response to the > article I referred to, yet your words are written as if it were. May I ask > why? Or have I missed something? Post hoc ergo propter hoc :( --

Re: test

2012-09-27 Thread Devin Jeanpierre
On Thu, Sep 27, 2012 at 5:28 PM, ForeverYoung wrote: > Please ignore this post. > I am testing to see if I can post successfully. Is there a reason you can't wait until you have something to say / ask to see if it works? You're spamming a large number of inboxes with nothing. -

Re: Article on the future of Python

2012-09-28 Thread Devin Jeanpierre
On Thu, Sep 27, 2012 at 8:59 PM, alex23 wrote: > On Sep 28, 2:17 am, Devin Jeanpierre wrote: >> Uncharitably, it's just a way of hiding one's head in the sand, >> ignoring any problems Python has by focusing on what problems it >> doesn't have. > > But

Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212.

2012-09-28 Thread Devin Jeanpierre
On Fri, Sep 28, 2012 at 9:58 PM, Mark Lawrence wrote: > What's the run time speed like? How much memory does it use? Shouldn't you > be using the regex module from pypi instead of the standard library re? > Guess who's borrowed the time machine? O(n), O(1), and I used

Re: Should one always add super().__init__() to the __init__?

2012-09-29 Thread Devin Jeanpierre
od thing. We've gone from code that doesn't call the initializer and leaves the object in a potentially invalid state (silently!), to code that calls the initializer and then fails (loudly). -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: fmap(), "inverse" of Python map() function

2012-10-05 Thread Devin Jeanpierre
( lambda rseq, newpre: rseq.append(f(newpre)) or rseq, seq, []) "X is a special case of reduce" is basically the same as saying "X can be implemented using a for loop". If it's meant as a complaint, it's a poor one. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: fmap(), "inverse" of Python map() function

2012-10-05 Thread Devin Jeanpierre
On Fri, Oct 5, 2012 at 7:24 PM, Ian Kelly wrote: > I realize that. My point is that the function *feels* more like a > variant of reduce than of map. > >> If it's meant as a complaint, it's a poor one. > > It's not. Fair enough all around. Sorry for

Re: Quickie - Regexp for a string not at the beginning of the line

2012-10-25 Thread Devin Jeanpierre
e beginning) - r"(?!^)mystring" (the string occurs elsewhere than the beginning) [Someone else's interpretation] Both are "regular expressions" even in the academic sense, or else have a translation as regular expressions in the academic sense. They're also Python reg

Re: a.index(float('nan')) fails

2012-10-26 Thread Devin Jeanpierre
to a float be? Answer: as large as 2, and the relative error can be arbitrarily large. (Reason: error scales with the input, but the frequency of the sin function does not.) (In case you can't tell, I only have studied this stuff as a student. :P) -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: while expression feature proposal

2012-10-26 Thread Devin Jeanpierre
in Python today: client = StrictRedis() for profile_id in iter(lambda: client.spop("profile_ids"), None): pass I would like a better iter(), rather than a better while loop. It is irritating to pass in functions that take arguments, and it is impossible to, say, pass in f

Re: while expression feature proposal

2012-10-26 Thread Devin Jeanpierre
ith", and it puts the variable on the wrong side of the assignment operator. (I've always been partial to ":=", personally.) -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: while expression feature proposal

2012-10-26 Thread Devin Jeanpierre
= {} >>> set_(d, 'x', 1) 1 >>> set_(d, 'y', set_(d, 'x', 2) + d['x']) 4 -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: while expression feature proposal

2012-10-26 Thread Devin Jeanpierre
signment is not here. This is a trivial case. It's in cases like this: while True: x = foo(bar()) if x is None: break if x % 2 == 0: break print x Imagine doing that with iter. :) -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: while expression feature proposal

2012-10-26 Thread Devin Jeanpierre
l be evaluated in the arithmetic order of their suffixes: ... expr1 + expr2 * (expr3 - expr4) I sympathize with your concern, though. Order of evaluation is very bitey, and it's better to be safe than sorry. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: while expression feature proposal

2012-10-26 Thread Devin Jeanpierre
arly preferable to new syntax from the perspective your rebuttal comes from. Indeed, one could write those helper functions, and use them, without any changes to Python being made at all! -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Immutability and Python

2012-10-29 Thread Devin Jeanpierre
any variable more than once. No, they were looking for a way to create classes whose instances are immutable. Also, immutability has nothing to do with the presence or lack of for loops. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: What are the minimum requirements to get a job in?

2012-12-13 Thread Devin Jeanpierre
0 kicks > I am afraid of the man who has practised 1 kick 10,000 times It's worth pointing out that kicks stay relevant for your entire life. Unfortunately, many programming languages don't. I guess the next metaphor would be stock investments and diversification. Point is, don't

Re: PyWart: Python regular expression syntax is not intuitive.

2012-01-25 Thread Devin Jeanpierre
ead. The Perl folks didn't like it either: http://en.wikipedia.org/wiki/Perl_6_rules -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: Python regular expression syntax is not intuitive.

2012-01-25 Thread Devin Jeanpierre
for "not equal" -- matches aren't equality. It stands for "not". It's the "=" that's a misnomer. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: Python regular expression syntax is not intuitive.

2012-01-25 Thread Devin Jeanpierre
in the re module. It's more generally useful, too. Would let re gain a PyParsing/SNOBOL like expression "syntax", for example. Or a regular grammar syntax. Neat for experimentation. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: import fails in non-interactive interpreter

2012-01-25 Thread Devin Jeanpierre
er with the -c flag) add the current working directory ('') to the module import search path (sys.path). Regular python execution does not. So modules in the current working directory can always be imported from the interactive interpreter, but not necessarily if you run python on a s

Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-26 Thread Devin Jeanpierre
get them to raise a different error, such as ValueError (in particular for preconditions)? -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-26 Thread Devin Jeanpierre
robably tell from my other projects, I'm bad at coming up > with snappy names. I'm bad at doing research on previous projects ;) I'm sure another name will come up as the goals mature/solidify. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: speaking at PyCon

2012-01-30 Thread Devin Jeanpierre
and click on the > bookmark.  DAMHIKT. I have to ask... was it python.com? -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: except clause syntax question

2012-01-30 Thread Devin Jeanpierre
ot just for except; it's a consistent thing that if you're going to do something with "X, or a bunch of X's", then it's either an X or a tuple of X's. For example, string formatting with % works this way, as does isinstance(a, X). -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: except clause syntax question

2012-01-31 Thread Devin Jeanpierre
ples as an object where you can get meaningfully things by field, rather than just grab arbitrarily from a bag of things. This isn't the only way they are used, see the except statement (hee) and their use as keys in dictionaries. But it is true that their immutable length makes them very well suited to the task of representing product types. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Disable use of pyc file with no matching py file

2012-02-01 Thread Devin Jeanpierre
ng everything for a tiny little feature. Evaluating only the monetary amounts can be misleading as to what the rational decision is (in particular when there are no monetary amounts). The only true notion of cost is the alternatives you sacrifice in making a decision: opportunity cost. The car is not free. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: copy on write

2012-02-01 Thread Devin Jeanpierre
gt; > ('a', [23, 42]) > > IMHO, this is worthy of bug-hood: shouldn't we be able to conclude from the > TypeError that the assignment failed? It did fail. The mutation did not. I can't think of any way out of this misleadingness, although if you can that would be pretty awesome. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Disable use of pyc file with no matching py file

2012-02-01 Thread Devin Jeanpierre
a common attitude among those that make these sorts of comments about Python 3, and I hadn't read anything in what you said that made me think that you were considering more than the superficial costs of moving. I am sorry that I did not give you the benefit of the doubt. -- Devin -- http://m

Re: SnakeScript? (CoffeeScript for Python)

2012-02-02 Thread Devin Jeanpierre
. On that note, Python isn't as functional as it could be. e.g. the "Python Coffeescript" could add pattern matching or TCO or something. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: copy on write

2012-02-02 Thread Devin Jeanpierre
On Thu, Feb 2, 2012 at 11:28 AM, MRAB wrote: > Should failed assignment be raising TypeError? Is it really a type > error? A failed setitem should be a TypeError as much as a failed getitem should. Should 1[0] be a TypeError? -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Common LISP-style closures with Python

2012-02-04 Thread Devin Jeanpierre
nt to put this feature in another category, but anyway, the function couldn't be written in some languages, even though they have closures. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the difference between @property and method

2012-02-09 Thread Devin Jeanpierre
08/aug/11/the-python-property-builtin/ -- It is kind of funny that the docs don't ever explicitly say what a property is. http://docs.python.org/library/functions.html#property -- Devin -- http://mail.python.org/mailman/listinfo/python-list

re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

2012-02-13 Thread Devin Jeanpierre
Hey Pythonistas, Consider the regular expression "$*". Compilation fails with the exception, "sre_constants.error: nothing to repeat". Consider the regular expression "(?=$)*". As far as I know it is equivalent. It does not fail to compile. Why the inconsistency? W

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-14 Thread Devin Jeanpierre
On Tue, Feb 14, 2012 at 6:31 AM, Duncan Booth wrote: > Here's a clue: No flu viruses are treatable with antibiotics. Oh my god we're too late! Now they're ALL resistant! -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

2012-02-14 Thread Devin Jeanpierre
On Tue, Feb 14, 2012 at 8:20 AM, Vinay Sajip wrote: > $ is a meta character for regular expressions. Use '\$*', which does > compile. I mean for it to be a meta-character. I'm wondering why it's OK for to repeat a zero-width match if it is a zero-width ass

Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

2012-02-14 Thread Devin Jeanpierre
ase. (see: http://hg.python.org/cpython/file/096e856a01aa/Lib/test/test_re.py#l599 ) And yeah, even something as crazy as ()* works, but as soon as it becomes (a*)* it doesn't work. Weird. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

2012-02-14 Thread Devin Jeanpierre
complete failure is an exceptionally (heh) poor way of warning people about stuff. I hope that's not really it. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

2012-02-15 Thread Devin Jeanpierre
esting, didn't know that was a bug rather than deliberate behavior. The other behavior (only match empty space once) makes more sense though. Thanks for linking. Still, that's for avoiding infinite loops in finditer/findall, not match/search :S -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: atexit.register in case of errors

2012-02-15 Thread Devin Jeanpierre
ning > why they shouldn't. In such a case. one can do:: if __name__ == '__main__': try: main() except SystemExit: pass goodbye() -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Devin Jeanpierre
entity = board.get_entity(x, y) except EntityNotFound: pass else: yield distance(player.pos, entity.pos), entity Please don't kill me. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python math is off by .000000000000045

2012-02-25 Thread Devin Jeanpierre
rs, the reals could be encoded as the union of the two, and by far most of them would be infinite. Anyway, all that aside, the real numbers are kind of dumb. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Devin Jeanpierre
ntent. Some languages do this. e.g. all lisps. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-03-01 Thread Devin Jeanpierre
e, > > > Hmm... maybe, instead of just ridiculing him, you could explain where he > is mistaken.  Of course, doing that is a *LOT* harder than just calling > him a bigot. I agree. Perhaps this is a good primer: http://www.maa.org/devlin/LockhartsLament.pdf -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: The original command python line

2012-03-03 Thread Devin Jeanpierre
things like exception handling (because exception types are unequal if they're from different classes, even if the different classes come from two executions of the same source code). -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Porting Python to an embedded system

2012-03-04 Thread Devin Jeanpierre
ere. 'cause writing an OS from scratch would suck. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is readable

2012-03-15 Thread Devin Jeanpierre
same / > equivalent code in each before judging? It's fair. But it's also fair to note that the comparison is silly, because the easiness of writing quines doesn't correspond with the easiness of doing productive things. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: cmd2, an extenstion of cmd that parses its argument line

2012-03-19 Thread Devin Jeanpierre
There already is a module named cmd2: http://pypi.python.org/pypi/cmd2 -- Devin On Mon, Mar 19, 2012 at 1:11 AM, wrote: > Dear all, > > I would like to announce the first public release of cmd2, an extension of > the standard library's cmd with argument parsing, here: >

Re: Documentation, assignment in expression.

2012-03-26 Thread Devin Jeanpierre
y to speak about assignment. Its only difference is the present tense. For example, in Python, "def" stands for "define", but we can overwrite previous definitions:: def f(x): return x def f(x): return 2 f(3) == 2 In fact, in pretty every programming language that I know

  1   2   3   4   >