Re: python without OO

2005-01-25 Thread Michael Spencer
Davor wrote: Thanks, I do not hate OO - I just do not need it for the project size I'm dealing with - and the project will eventually become open-source and have additional developers - so I would prefer that we all stick to simple procedural stuff rather than having to deal with a developer that

Re: Reload Tricks

2005-01-22 Thread Michael Spencer
Kamilche wrote: I want my program to be able to reload its code dynamically. I have a large hierarchy of objects in memory. The inheritance hierarchy of these objects are scattered over several files. Michael Spencer wrote: An alternative approach (with some pros and cons) is to modify the class

Re: default value in a list

2005-01-22 Thread Michael Spencer
Alex Martelli wrote: [explanation and the following code:] a, b, c = it.islice( ... it.chain( ... line.split(':'), ... it.repeat(some_default), ... ), ... 3) ... ... def pad_with_default(N, iterable,

Re: What YAML engine do you use?

2005-01-22 Thread Michael Spencer
Paul Rubin wrote: YAML looks to me to be completely insane, even compared to Python lists. I think it would be great if the Python library exposed an interface for parsing constant list and dict expressions, e.g.: [1, 2, 'Joe Smith', 8237972883334L, # comment {'Favorite fruits':

Re: pure python code to do modular-arithmetic unit conversions?

2005-01-21 Thread Michael Spencer
Dan Stromberg wrote: Is there already a pure python module that can do modular-arithmetic unit conversions, like converting a huge number of seconds into months, weeks... or a bandwidth measure into megabits/s or gigabits/s or megabytes/s or gigabytes/s, whatever's the most useful (ala df -h)?

Re: Reload Tricks

2005-01-21 Thread Michael Spencer
Kamilche wrote: I want my program to be able to reload its code dynamically. I have a large hierarchy of objects in memory. The inheritance hierarchy of these objects are scattered over several files. I find that after reloading the appropriate files, and overwriting the __class__ of object

args (was Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?))

2005-01-04 Thread Michael Spencer
Roman Suzi wrote: Maybe this is too outlandish, but I see lambdas as a quote mechanism, which presents a possibility to postpone (precisely control, delegate) evaluation. That is, an ovehead for lambda must be much lower but at the same time visible to the programmer: d = a + (lambda x, y: x+

Re: Securing a future for anonymous functions in Python

2004-12-30 Thread Michael Spencer
topic /Idle speculation Michael Spencer -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4