Re: best ways to deal with bool values in config ?

2009-01-23 Thread Mike Orr
On Thu, Jan 22, 2009 at 9:43 PM, Tycon adie...@gmail.com wrote: Python is so messed up, the only explanation is that the people making it up are blindly following misguided principles. Since it's so easy to make a web framework in Python, why don't you make your own and then you won't have to

Re: best ways to deal with bool values in config ?

2009-01-23 Thread Tycon
I was just responding to other people's posts, and I'm not the only person to ever criticize python (while still acknoledging its strengths). On Jan 23, 1:45 am, Alberto Valverde albe...@toscat.net wrote: Mike Orr wrote: On Thu, Jan 22, 2009 at 9:43 PM, Tycon adie...@gmail.com wrote:

Re: best ways to deal with bool values in config ?

2009-01-22 Thread Mike Orr
On Wed, Jan 21, 2009 at 4:30 PM, Jonathan Vanasco jonat...@findmeon.com wrote: i store a lot of stuff in config, much of which is 'framework' related across modules. the current way i deal with bools is this ( by storing things in app_globals during init ) g.enable_feature_x= False

Re: best ways to deal with bool values in config ?

2009-01-22 Thread Tycon
This is another example of the flawed, broken code known as Paste. Pylons should decouple itself from Paste On Jan 22, 12:11 pm, Mike Orr sluggos...@gmail.com wrote: On Wed, Jan 21, 2009 at 4:30 PM, Jonathan Vanasco jonat...@findmeon.com wrote: i store a lot of stuff in config, much of

Re: best ways to deal with bool values in config ?

2009-01-22 Thread Wyatt Baldwin
On Jan 22, 1:14 pm, Tycon adie...@gmail.com wrote: This is another example of the flawed, broken code known as Paste. Pylons should decouple itself from Paste But Pylons, as you've pointed out, is flawed in numerous ways as well. Let's throw it *all* away!

Re: best ways to deal with bool values in config ?

2009-01-22 Thread Tycon
I would gladly throw python away if only ruby matched its performance. On Jan 22, 3:48 pm, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Jan 22, 1:14 pm, Tycon adie...@gmail.com wrote: This is another example of the flawed, broken code known as Paste. Pylons should decouple itself

Re: best ways to deal with bool values in config ?

2009-01-22 Thread Wyatt Baldwin
On Jan 22, 8:21 pm, Tycon adie...@gmail.com wrote: I would gladly throw python away if only ruby matched its performance. There's another option you may be interested, in case you haven't heard of it: C. It's *very* fast. On Jan 22, 3:48 pm, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote:

Re: best ways to deal with bool values in config ?

2009-01-22 Thread Tycon
C is my expertise, but it can't match the productivity of python or Ruby Fortnately for C, it will always retain the performance crownm so it will always have its uses The same thing cannot be said for python. Once its performance is once its performance is matched by a better language such as

Re: best ways to deal with bool values in config ?

2009-01-22 Thread Wyatt Baldwin
On Jan 22, 9:43 pm, Tycon adie...@gmail.com wrote: C is my expertise, but it can't match the productivity of python or Ruby Fortnately for C, it will always retain the performance crownm so it will always have its uses The same thing cannot be said for python. Once its performance is once

best ways to deal with bool values in config ?

2009-01-21 Thread Jonathan Vanasco
i store a lot of stuff in config, much of which is 'framework' related across modules. the current way i deal with bools is this ( by storing things in app_globals during init ) g.enable_feature_x= False if 'org.opensn.pylons.enable_feature_x' in config:

Re: best ways to deal with bool values in config ?

2009-01-21 Thread Gael Pasgrimaud
If you mean what is the best practise to convert bools, PasteDeploy provide a few helpers: from paste.deploy.converters import asbool I also have this in helpers.py (don't know why I can't find something similar in the paste namespace): class Params(dict): def __getattr__(self, attr):