Re: Discussion board software?

2010-10-28 Thread Tim Harig
On 2010-10-29, Gnarlodious wrote: > On Oct 28, 7:20 pm, Tim Harig wrote: >> On 2010-10-29, Gnarlodious wrote: >> >> > Is there such a thing as website discussion board software written in >> > Python? >> >> Yes. > > OK I'll play, what and where? CMS's written in Python generally have some kind

Re: Why "flat is better than nested"?

2010-10-28 Thread Andreas Waldenburger
On Wed, 27 Oct 2010 22:47:35 -0700 (PDT) alex23 wrote: > On Oct 27, 7:58 pm, Robin Becker wrote: > > >> "I know that that that that that boy said is wrong!". > > > > well they say nested is hard. How about this break down > > > > I know that X that a boy said is wrong. (any boy) > > I know that

Re: Why "flat is better than nested"?

2010-10-28 Thread alex23
Andreas Waldenburger wrote: > No, it wouldn't, hence Stefan's (and your) error. It maps to a specific > boy. Replacing "that"s where possible, it becomes: > > I know that [the] "that" [which] that boy said is wrong. Ah, I see now: I know that that "that" that _that_ boy said is wrong :) -- http:

Re: Calling a method from invoking module

2010-10-28 Thread Chris Rebert
On Thu, Oct 28, 2010 at 8:33 PM, Baskaran Sankaran wrote: > Sorry for the confusion; fooz(), track() and barz() are all members of their > respective classes. I must have missed the self argument while creating the > synthetic example. > > Yeah, I realize the mutual import is a bad idea. So, if I

Re: Discussion board software?

2010-10-28 Thread Andreas Waldenburger
On Fri, 29 Oct 2010 01:28:12 + brad...@hotmail.com wrote: [fixed top posting] > --Original Message-- > From: Gnarlodious > Sender: python-list-bounces+bradenf=hotmail@python.org > To: Python List > Subject: Discussion board software? > Sent: Oct 28, 2010 9:12 PM > > > Is there such

factorial of negative one (-1)

2010-10-28 Thread Bj Raz
I am working with differential equations of the higher roots of negative one. (dividing enormous numbers into other enormous numbers to come out with very reasonable numbers). I am mixing this in to a script for Maya (the final output is graph-able as a spiral.) I have heard that Sage

Re: Why "flat is better than nested"?

2010-10-28 Thread rantingrick
On Oct 27, 8:40 pm, Steven D'Aprano wrote: > Although the Zen is written in a light-hearted fashion, it is not > intended as a joke. Every line in the Zen is genuine advice -- even the > one about being Dutch. Would it help to write it out in a less light- > hearted fashion? > > When programming

Re: factorial of negative one (-1)

2010-10-28 Thread Xavier Ho
On 29 October 2010 14:41, Bj Raz wrote: > > Since Python can't call functions, I would like to know if there is a work > around. > Python can't call functions? I'm sorry, but I may have misunderstood what you are trying to say. I'm not familiar with the mathematical definition of factorial, but

Re: factorial of negative one (-1)

2010-10-28 Thread Chris Rebert
On Thu, Oct 28, 2010 at 9:41 PM, Bj Raz wrote: > I am working with differential equations of the higher roots of negative > one. (dividing enormous numbers into other enormous numbers to come out with > very reasonable numbers). > I am mixing this in to a script for Maya (the final output is graph

Re: How on Factorial

2010-10-28 Thread Stefan Behnel
Arnaud Delobelle, 28.10.2010 20:38: using ~-n instead of n-1 if obfuscatory and doesn't even save keystrokes! (Although it could in other situations, e.g 2*(n-1) can be written 2*~-n, saving two brackets.) Sure, good call. And look, it's only slightly slower than the obvious code: $ python3 -

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread John Nagle
On 10/28/2010 9:23 AM, John Posner wrote: On 10/28/2010 12:16 PM, cbr...@cbrownsystems.com wrote: It's clear but tedious to write: if 'monday" in days_off or "tuesday" in days_off: doSomething I currently am tending to write: if any([d for d in ['monday', 'tuesday'] if d in days_off]): doSome

Re: Python changes

2010-10-28 Thread Stefan Behnel
Teenan, 28.10.2010 21:16: On Thu, 2010-10-28 at 15:03 -0400, Craig McRoberts wrote: Thanks for the prompt replies. Sounds like it's time to hit a bookstore. You could do a lot worse than getting 'Dive into Python' (There's even a nice new version just for python 3.0) Yes, and the thing I lik

embedding python ImportError: libpyglib PyExc_ImportError

2010-10-28 Thread Oliver Marks
Hi i am a new member on this list and thought if some people may be able to enlighten me to the error below ? I am running 64 bit ubuntu 10.10 and python 2.6 in case there are know issues with this setup, basically i am embedding python inside a c application i managed to get this to work i can c

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread Paul Rubin
John Nagle writes: >d1 = set('monday','tuesday') >days_off = set('saturday','sunday') >if not d1.isdisjoint(days_off) :... >This is cheaper than intersection, since it doesn't have to > allocate and construct a set. It just tests whether any element in the > smaller of the two sets

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread Xavier Ho
On 29 October 2010 15:50, Paul Rubin wrote: > John Nagle writes: > >d1 = set('monday','tuesday') > >days_off = set('saturday','sunday') > >if not d1.isdisjoint(days_off) :... > >This is cheaper than intersection, since it doesn't have to > > allocate and construct a set. It just

Calling Python from Haskell

2010-10-28 Thread Paul Rubin
For any Haskell fans that might be reading this, here is a blog post (not by me) about a new package for calling Python code from Haskell code. It basically works by connecting the C API's of both languages together: http://john-millikin.com/articles/ride-the-snake/ -- http://mail.python.org/m

How to Fix JavaScript Error ...

2010-10-28 Thread neha shena
How to Fix JavaScript Error ... Javascript error usually appears with a yellow triangle in pop up box and telling you to debug. A problem with JavaScript embedded in the ..read more http://childschooledu.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

How to Fix JavaScript Error ...

2010-10-28 Thread neha shena
How to Fix JavaScript Error ... Javascript error usually appears with a yellow triangle in pop up box and telling you to debug. A problem with JavaScript embedded in the ..read more http://childschooledu.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

<    1   2