Re: Recommended "new" way for config files

2010-02-25 Thread Nicola Larosa (tekNico)
Peter wrote: > There seems to be several strategies to enhance the old ini-style config > files with real python code > [...] > Is there a strategy that should be prefered for new projects ? 5) Use ConfigObj , by Michael Foord and yours truly. It

Re: Question on Python as career

2009-12-11 Thread Nicola Larosa (tekNico)
> Tim Roberts wrote: >> There are very, very few full-time Python jobs anywhere in the world, >> although many people use Python as one tool in their toolbox. Not that few. Anyway, it's not a zero-sum game: you want to work with Python? Find a job where *you* introduce it. :-) Aahz wrote: > All

Re: Code formatting question: conditional expression

2009-08-25 Thread Nicola Larosa (tekNico)
Nicola Larosa wrote: > Here's my take: > >     excessblk = Block(total - P.BASE, srccol, > carry_button_suppress=True >         ) if total > P.BASE else None Oops, it got shortened out: line longer than 72 chars, acceptable in code, but not in email. I'll try again. If the first line is too long,

Re: Code formatting question: conditional expression

2009-08-25 Thread Nicola Larosa (tekNico)
John Posner wrote: > Is there any consensus on how to format a conditional expression > that is too long for one line? Here's my take: excessblk = Block(total - P.BASE, srccol, carry_button_suppress=True ) if total > P.BASE else None -- Nicola Larosa - http://www.tekNico.net/ Nobody

Re: PYTHON WORKING WITH PERL ??

2008-11-01 Thread Nicola Larosa (tekNico)
Pat <[EMAIL PROTECTED]> wrote: > After you learn Python, you'll come to despise Perl. Some of us came to despise Perl *before* learning Python (third to last paragraph): A journey through languages http://www.teknico.net/devel/journey/index.en.html -- Nicola Larosa - http://www.tekNico.net/ Loo

Re: Is a "real" C-Python possible?

2007-12-12 Thread Nicola Larosa (tekNico)
sturlamolden wrote: > def fibo(n): > while 1: > try: > return fibo.seq[n] > except AttributeError: > fibo.seq = [0, 1, 1] > except IndexError: > fibo.seq.append( fibo.seq[-2] + fibo.seq[-1] ) I really like this formulation. However, i

Is Ruby 1.9 going to be faster than CPython?

2007-11-28 Thread Nicola Larosa (tekNico)
Holy Shmoly, Ruby 1.9 smokes Python away! http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/ The post is less flaming than the title, fortunately. :-) -- Nicola Larosa - http://www.tekNico.net/ If you have multiple CPUs and you want to use them all, fork off as many pr