Re: Proof that \ is a better line joiner than parenthetical sets

2008-06-06 Thread Jordan Greenberg
Joshua Kugler wrote: "Beautiful is better than ugly." And I think putting parenthesis around a multi-line statement is much prettier. So there! :) j And PEP 8 agrees with you. Another vote for parens. -Jordan -- http://mail.python.org/mailman/listinfo/python-list

Re: namespace question

2007-05-18 Thread Jordan Greenberg
T. Crane wrote: > Hi, > > If I define a class like so: > > class myClass: > import numpy > a = 1 > b = 2 > c = 3 > > def myFun(self): > print a,b,c > return numpy.sin(a) > > > I get the error that the global names a,b,c,numpy are not defined. Fairly > stra

Re: python skipping lines?

2006-11-27 Thread Jordan Greenberg
[EMAIL PROTECTED] wrote: > Hi, > Any ideas of what could be the problem? > Hard to say without seeing your code. Jordan Greenberg -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

Re: test message

2006-11-26 Thread Jordan Greenberg
Ben Finney wrote: > Jordan Greenberg <[EMAIL PROTECTED]> writes: > >> [EMAIL PROTECTED] wrote: >>> This is a test message, please ignore. >> I could do that, but reminding you that test messages go in *.test >> groups is way more fun. > > I'

Re: test message

2006-11-26 Thread Jordan Greenberg
[EMAIL PROTECTED] wrote: > This is a test message, please ignore. I could do that, but reminding you that test messages go in *.test groups is way more fun. And there are about a billion of them to choose from. The great thing about test groups is that when you use them, you don't clutter up my (a

Re: FOR statement

2006-10-20 Thread Jordan Greenberg
4 > 3 > 2 > 1 >>> def printreverse(lst): if lst: printreverse(lst[1:]) print lst[:1][0] >>> printreverse([1,2,3,4]) No good reason at all to do it this way. But recursion is fun. -Jordan Greenberg -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

Re: proper format for this database table

2006-10-19 Thread Jordan Greenberg
d Universities: UniversityID Name City Etc,etc) In general, when you're having trouble representing something in a database, it helps to break it down and model the smaller relationships first, and use those as building blocks to model the whole relationship. HTH. Jordan Greenberg

Re: Question about using python as a scripting language

2006-08-07 Thread Jordan Greenberg
ect (or medium sized, or anything more then a few lines, really) this gets really unwieldy really quickly (imagine if you had thousands of functions! Madness!) Terry's suggestion is a much better solution then this. If this looks easier, consider changing the rest of your program before klud

Re: Getting a loop to activate a loop above it

2006-03-22 Thread Jordan Greenberg
x=1 while not x==3: if x==1: print 'hello' x = input('what is x now?: ') if x==2: print 'hello again' x=input('what is x now?: ') any code you want to repeat needs to be in some sort of a loop structure. Program execution doesn't just jump around unless you t

Re: Function params with **? what do these mean?

2006-03-20 Thread Jordan Greenberg
in the parameter list, **param gets a dict of arguments that dont correspond to somthing in the formal parameter list. More & examples in the python docs: http://docs.python.org/tut/node6.html#SECTION00672 -- Jordan T. Greenberg -- http://mail.python.org/mailman/listinfo/python

Re: help

2006-03-08 Thread Jordan Greenberg
I see no problem with finding existing code on the Internet and used to learn a subject, so long as it isn't just stolen and handed in as is. I guess I still believe people are good, no matter how hard Usenet and IRC tries to convince me otherwise. -- http://mail.python.org/mailman/listinfo/pyth