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
http://code.google.com/p/pyshards/
Devin Venable
--
http://mail.python.org/mailman/listinfo/python-list
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
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?
>
> >
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
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
a different character/subexpression for each
branch. And then there's exponentially many possible branches.
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
"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
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
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
d(...):
...
if condition:
decorated = decorator1(decorator2(decorated))
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
s real
threads or greenlet or whatever are involved, of course.)
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
ill ignoring what I actually said.
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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
e! The term is agnostic as to what
the temperature of the universe will be.
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
ople to do better?
/me has been paying too much attention to the Elsevier boycott
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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
Here in Canada we celebrate Tau day.
-- Devin
(... I wish.)
--
http://mail.python.org/mailman/listinfo/python-list
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
;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
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
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
; 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
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
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
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
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
. 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
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
>
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 :(
--
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.
-
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
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
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
(
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
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
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
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
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
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
= {}
>>> set_(d, 'x', 1)
1
>>> set_(d, 'y', set_(d, 'x', 2) + d['x'])
4
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
get them to raise a different error, such as ValueError (in
particular for preconditions)?
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
and click on the
> bookmark. DAMHIKT.
I have to ask... was it python.com?
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
. 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
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
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
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
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
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
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
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
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
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
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
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
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
ntent.
Some languages do this. e.g. all lisps.
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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
ere. 'cause writing an OS
from scratch would suck.
-- Devin
--
http://mail.python.org/mailman/listinfo/python-list
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
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:
>
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 - 100 of 373 matches
Mail list logo