Re: RuPy 2007 - Python & Ruby Conference

2006-09-11 Thread Kay Schluehr
Magnus Lycka wrote: > Jakub Piotr Nowak wrote: > > RuPy 2007 > > Python & Ruby Conference > > > > Poznan, Poland > > April 7-8, 2007 > > Are you aware of the EuroPython Conference which > will take place in Vilnius three months later? If I understand the intention right its kind of a peace pipe c

Re: Is it just me, or is Sqlite3 goofy?

2006-09-09 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > I wouldn't be at all surprised if the pysqlite author operated under that > assumption. That the Python developers didn't pick up on the issue is not > surprising. I'm not sure how many of them are (py)sqlite users, probably > relatively few. > > Skip Who has reviewe

Re: Is it just me, or is Sqlite3 goofy?

2006-09-08 Thread Kay Schluehr
> It's not a bug, it's a feature. And answered as third point in the FAQ: > > http://www.sqlite.org/faq.html#q3 > > I think your whole experience is based on it. Live with it or use a > real RDBMS. > > If you are so fond of static typing, why are you using Python in the first > place? Just see

Re: python loops

2006-08-31 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > AlbaClause wrote: > > > for i in range(length): > > print i > > Or usually better: > > for ii in xrange(length): ~~ I hate ii ;) Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: python loops

2006-08-31 Thread Kay Schluehr
Putty wrote: > In C and C++ and Java, the 'for' statement is a shortcut to make very > concise loops. In python, 'for' iterates over elements in a sequence. > Is there a way to do this in python that's more concise than 'while'? > > C: > for(i=0; i > > python: > while i < length: >

Re: What do you want in a new web framework?

2006-08-30 Thread Kay Schluehr
Cliff Wells wrote: > My single wishlist item (which will probably never happen) is actually > the *removal* of a single "feature": the distinction between statements > and expressions. Forget list comprehensions, ternary operators, etc. > You get them with no additional syntax in expression-based

Re: What do you want in a new web framework?

2006-08-21 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > Hello Everyone, > > Now, I'm working on a new web framework. I tried many test on the other > programming languages. Then i decided to use python on my web framework > project. > > Now i want to listen all of you. What do you want in that web > framework(Easy use of Data

Re: Defining our own types?

2006-08-16 Thread Kay Schluehr
Michael Yanowitz wrote: > Hello: > >I know this will probably turn about to be another dumb question > and I know I have asked a few really dumb ones lately on this list, > but I am hoping otherwise this time: > > suppose I type: > ip = 123.45.67.89 > (no quotes) > - is it possible (maybe

Re: programming with Python 3000 in mind

2006-08-15 Thread Kay Schluehr
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > The current beta version of Python is 2.5 . How can a Python programmer > > minimize the number of changes that will be needed to run his code in > > Python 3000? > > by ignoring it, until it exists. > > And why not ignoring it, when it come

Re: Are there any AOP project in python community?

2006-08-02 Thread Kay Schluehr
steve wrote: > I mean Aspect-Oriented Programming. > If any please give me some of links. > Thanks a lot. http://www.google.de/search?hl=de&q=python+%2B+AOP&btnG=Google-Suche&meta= -- http://mail.python.org/mailman/listinfo/python-list

Snake is eating itself

2006-08-02 Thread Kay Schluehr
Diez B. Roggisch wrote: > Kay Schluehr wrote: > > > > > Tomi Lindberg wrote: > >> Hi, > >> > >> With the following function definition, is it possible to > >> create an instance of class C outside the function f (and if > >> it is,

Re: Class definition within function

2006-08-02 Thread Kay Schluehr
Tomi Lindberg wrote: > Hi, > > With the following function definition, is it possible to > create an instance of class C outside the function f (and if > it is, how)? def f(): class C(object): def __init__(self): self.a = 'a' f.C = C return C() >>> f.C >

Attribute protection the 2nd

2006-08-02 Thread Kay Schluehr
A new recipe for attribute protection which is aligned with Pythons convention of privacy indication using underscore name mangling. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496930 Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Protection levels in Python

2006-07-27 Thread Kay Schluehr
People often ask for making attributes "private" in the sense of restricting access as in Java or C++. I've created a recipe for attribute protection where all attributes are basically protected in the C++ sense of being visible in the class and in subclasses and where "public" attributes have to b

Re: Need a compelling argument to use Django instead of Rails

2006-07-27 Thread Kay Schluehr
Bruno Desthuilliers wrote: > >>Care to write an external DSL in Ruby ? > > I mean : write a parser and interpreter for a DSL. In Ruby. It is this kind of stuff Rubys talk about when they mention "DSLs in Ruby": http://www.artima.com/rubycs/articles/ruby_as_dsl.html -- http://mail.python.org/m

Re: Need a compelling argument to use Django instead of Rails

2006-07-27 Thread Kay Schluehr
Jaroslaw Zabiello wrote: > Of course, I you like, you can freeze every object you want and nobody can > be able to open and change it. You can also trace all activity for changing > something to objects because Ruby has nice system hooks implemented. Ruby > has nice security system (private, prote

Re: Need a compelling argument to use Django instead of Rails

2006-07-26 Thread Kay Schluehr
Ray wrote: > > But you can't compile a Python module into a dotNet library that is > > used from C# which is the very essence of the CLR. IronPython is not > > more usefull than PythonNet. > > At least for my case I will use IronPython for higher level task, and > perhaps calls libraries written i

Re: Need a compelling argument to use Django instead of Rails

2006-07-26 Thread Kay Schluehr
Ray wrote: > David Cook wrote: > > On 2006-07-24, Sybren Stuvel <[EMAIL PROTECTED]> wrote: > > > > > Jython isn't up to par with current Python versions either. > > > > But the last release is up to the level of C-Python 2.2 or so. I don't > > really feel like I'm missing that much with it. > > Yo

Re: Partial classes

2006-07-19 Thread Kay Schluehr
John Salerno wrote: > Marc 'BlackJack' Rintsch wrote: > > > Can you flesh out your use case a little bit and tell why you can't solve > > the problem with inheritance or a meta class? > > From my experience with C#, the only real use for partial classes is > when you want to separate your GUI cod

Re: Partial classes

2006-07-19 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > Sanjay wrote: > > Hi All, > > > > Not being able to figure out how are partial classes coded in Python. > > > > Example: Suppose I have a code generator which generates part of a > > business class, where as the custome part is to be written by me. In > > ruby (or C#), I

Re: Partial classes

2006-07-19 Thread Kay Schluehr
Bruno Desthuilliers wrote: > Sanjay wrote: > > Hi Alex, > > > > Thanks for the input. > > > > Being new to Python, and after having selected Python in comparison to > > ruby (Turbogears vs Rails) , is jerks me a bit. In my openion it should > > be an obvious and easy to implement feature and must

Re: Partial classes

2006-07-18 Thread Kay Schluehr
Sanjay wrote: > Hi All, > > Not being able to figure out how are partial classes coded in Python. > > Example: Suppose I have a code generator which generates part of a > business class, where as the custome part is to be written by me. In > ruby (or C#), I divide the code into two source files. L

Re: EuroPython 2006 and Py3.0

2006-07-05 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > >From this interesting blog entry by Lawrence Oluyede: > http://www.oluyede.org/blog/2006/07/05/europython-day-2/ > and the Py3.0 PEPs, I think the people working on Py3.0 are doing a > good job, I am not expert enough (so I don't post this on the Py3.0 > mailing list),

Re: Reddit broke - should have remained on Lisp?

2006-06-30 Thread Kay Schluehr
Tayssir John Gabbour wrote: > Alok wrote: > > "reddit broke (sorry)" > > "looks like we shouldn't have stopped using lisp..." > > > > See screenshot at > > http://photos1.blogger.com/blogger/1773/1980/1600/reddit-broke.jpg > > > > Whether they truly repent not using lisp or otherwise, their site >

Re: Immutability

2006-06-29 Thread Kay Schluehr
Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> writes: > |> Nick Maclaren wrote: > |> > The way that I read it, Python allows only values (and hence types) > |> > to be immutable, and not class members. The nearest approach to the > |> > latter is to use

Re: Python decompiler

2006-06-29 Thread Kay Schluehr
subramanian2003 wrote: > Hello All, > > I have some compiled python 2.4 scripts. If anyone has python decompiler, > pls send me. > > Thanks, > subramanian. http://www.python.org/doc//2.4/lib/module-dis.html -- http://mail.python.org/mailman/listinfo/python-list

Re: code is data

2006-06-23 Thread Kay Schluehr
Anton Vredegoor wrote: > Paul Boddie wrote: > > > Anton Vredegoor wrote: > > >> Yes, but also what some other posters mentioned, making Pythons internal > >> parsing tree available to other programs (and to Python itself) by using > >> a widely used standard like XML as its datatype. > > > > http:

Re: Status of optional static typing in Python?

2006-06-22 Thread Kay Schluehr
Christian Convey wrote: > Hi guys, > > I'm looking at developing a somewhat complex system, and I think some > static typing will help me keep limit my confusion. I.e.: > > http://www.artima.com/weblogs/viewpost.jsp?thread=87182 > > Does anyone know if/when that feature may become part of Python?

Re: Iteration over recursion?

2006-06-21 Thread Kay Schluehr
You might use a separate prime generator to produce prime factors. The factorize algorithm becomes quite simple and configurable by prime generators. For demonstration purposes I use the eratosthenes sieve. def eratosthenes(): memo = {} q = 2 while True: p = memo.pop(q, None)

Re: Iteration over recursion?

2006-06-20 Thread Kay Schluehr
Nick Maclaren wrote: > Tail recursion removal can often eliminate the memory drain, but the > code has to be written so that will work - and I don't know offhand > whether Python does it. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691 Regards, Kay -- http://mail.python.org/mail

Re: code is data

2006-06-20 Thread Kay Schluehr
Fredrik Lundh wrote: > Kay Schluehr wrote: > > > If it is just a different kind of representation of common data > > structures > > but how do you know ? > > The semantics is specified by the syntax transformer so it is actually compile-time semantics relative to

Re: Seeking regex optimizer

2006-06-19 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > Kay Schluehr wrote: > > I have a list of strings ls = [s_1,s_2,...,s_n] and want to create a > > regular expression sx from it, such that sx.match(s) yields a SRE_Match > > object when s starts with an s_i for one i in [0,...,n]. > > Why do

Re: code is data

2006-06-19 Thread Kay Schluehr
Ian Bicking wrote: > > I don't use Django and I made this up quickly, so please don't pick on > > subtleties. > > > > @Poll: > > question: char length 200 > > pub_date('date published'): date > > > > @Choice: > > poll -> Poll > > choice: char length 200 > > votes: int > > That

Re: code is data

2006-06-19 Thread Kay Schluehr
Ravi Teja wrote: > People have however written various language interpreters (Scheme, > Forth and yes, even Basic) in Python, just for kicks. Still does not > make it a DSL language anymore than it makes C a DSL language. > > At present, the closest thing to writing a DSL in Python is Logix > htt

Re: Seeking regex optimizer

2006-06-19 Thread Kay Schluehr
Mirco, with "special characters" I mentioned control characters of regular expressions i.e. one of ".^$()?[]{}\|+*" but not non ascii-127 characters. For a workaround you simply have to "mangle" those using an escape control character: REGEXCHAR = ".^$()?[]{}\\|+*" def mangle(s): pattern = [

Re: Seeking regex optimizer

2006-06-18 Thread Kay Schluehr
Paddy wrote: > Kay Schluehr wrote: > > I have a list of strings ls = [s_1,s_2,...,s_n] and want to create a > > regular expression sx from it, such that sx.match(s) yields a SRE_Match > > object when s starts with an s_i for one i in [0,...,n]. There might > > be rela

Seeking regex optimizer

2006-06-18 Thread Kay Schluehr
I have a list of strings ls = [s_1,s_2,...,s_n] and want to create a regular expression sx from it, such that sx.match(s) yields a SRE_Match object when s starts with an s_i for one i in [0,...,n]. There might be relations between those strings: s_k.startswith(s_1) -> True or s_k.endswith(s_1) ->

Re: better Python IDE? Mimics Maya's script editor?

2006-06-09 Thread Kay Schluehr
warpcat wrote: > I've been scripting in Maya, via mel for years now. Recently learning > to Python, love it. Thing that's driving me nuts it the IDE. http://wiki.python.org/moin/IntegratedDevelopmentEnvironments -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamic inheritance

2006-06-09 Thread Kay Schluehr
alf wrote: > is there any way to tell the class the base class during runtime? > > a. Example: >>> class A(object):pass >>> class B(A):pass >>> B.mro() [, , ] See also Micheles nice article about the semantics of the "mro" ( method resolution order). http://www.python.org/download/releases/2.3

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-06 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > I wrote a program that takes an XML file into memory using Minidom. I > found out that the XML document is 10gb. > > I clearly need SAX or something else? > > Any suggestions on what that something else is? Is it hard to convert > the code from DOM to SAX? If your XML f

Re: what are you using python language for?

2006-06-06 Thread Kay Schluehr
hacker1017 wrote: > im just asking out of curiosity. To get an impression you might have a look at the Europython 2006 schedule: http://indico.cern.ch/conferenceTimeTable.py?confId=44 Personally I'm playing with the language itself at the moment and extend it through it: http://www.fiber-space.

Re: calling functions style question

2006-06-06 Thread Kay Schluehr
Brian wrote: > I just have a basic style question here. Suppose you have the program: > > def foo1(): > do something > > def foo2() > do something else > > Assume that you want to call these functions at execution. Is it more > proper to call them directly like: > > foo1() > foo2() > > o

Re: Namespace problems

2006-06-06 Thread Kay Schluehr
Kiran wrote: > Hello All, > I am kind of a beginner to python, but here is the deal. > > I am writing a wxpython Application, in which I have a GUI. This GUI > imports some other modules that I have written, using the format > import mymodule as _MyModule > > Now, this GUI in addition to hav

Re: John Bokma harassment

2006-05-25 Thread Kay Schluehr
Dražen Gemic wrote: > Larry Elmore wrote: > > No shit. Lately it seems that for every "spam" post of Xah's, there's > > at three or more by John *to all the same newsgroups* bitching about > > Xah's use of bandwidth. Pot, meet kettle. I'm killfiling Xah for being > > a useless twit and killfili

Re: PEP 3102 for review and comment

2006-05-24 Thread Kay Schluehr
molasses wrote: > I don't mind the naked star and will be happy if thats what we end up with. > > Though how about using *None? > I think that makes the intention of the function clearer. > > eg. > def compare(a, b, *None, key=None): > > Which to me reads as "no further positional arguments". > >

Re: A critic of Guido's blog on Python's lambda

2006-05-24 Thread Kay Schluehr
Michele Simionato wrote: > Kay Schluehr wrote: > > http://www.fiber-space.de/EasyExtend/doc/EE.html > > Well, I have not read that page yet, but the name "fiber space" reminds > me of old > memories, when I was doing less prosaic things than now. Old times .

Re: John Bokma harassment

2006-05-24 Thread Kay Schluehr
bradb wrote: > > C'mon, John Bokma (and everyone else dumb enough to crosspost their > > shushing to every group on the crosspost list -- why do they do that? So > > Xah will hear them six times? No, they want everyone to see how witty > > they are when they tell Xah off. Now /that/ is spam) is th

Re: A critic of Guido's blog on Python's lambda

2006-05-23 Thread Kay Schluehr
Ken Tilton wrote: > Is there any experiemntal macro package out there for Python? Maybe a > preprocessor, at least? Or are there ways to actually hack Python to > extend the syntax? Yes. I've just released EasyExtend that does this kind of job: http://www.fiber-space.de/EasyExtend/doc/EE.html I

ANN: EasyExtend

2006-05-22 Thread Kay Schluehr
After fixing some more severe bugs last weekend I decided to go online with EasyExtend and its homepage yet. EasyExtend was my Python hobby-horse and fun project the last months. It was exactly the kind of programming from which I wanted to become surprised myself. EasyExtend is essentially a syst

Re: Far from complete

2006-05-16 Thread Kay Schluehr
Steve Holden wrote: > Kay Schluehr wrote: > > Section 2.3 of the Python 2.5. tutorial > > > > "The following sections describe the standard types that are built into > > the interpreter. Historically, Python's built-in types have differed > > from user-d

Far from complete

2006-05-15 Thread Kay Schluehr
Section 2.3 of the Python 2.5. tutorial "The following sections describe the standard types that are built into the interpreter. Historically, Python's built-in types have differed from user-defined types because it was not possible to use the built-in types as the basis for object-oriented inheri

Re: New tail recursion decorator

2006-05-12 Thread Kay Schluehr
Duncan Booth wrote: > The decorator also fails for functions which are tail-recursive but which > contain other non-tail recursive calls within themselves. For example I > would be pretty sure you couldn't write a working implementation of > Ackermann's function using the decorator: > > def Ack(M,

New tail recursion decorator

2006-05-10 Thread Kay Schluehr
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691 -- http://mail.python.org/mailman/listinfo/python-list

Re: New tail recursion decorator

2006-05-10 Thread Kay Schluehr
Diez B. Roggisch wrote: > Kay Schluehr wrote: > > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691 > > Neat. > > Diez Hi Diez, for all those who already copied and pasted the original solution and played with it I apologize for radical changes in the lat

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Kay Schluehr
Tomasz Zielonka wrote: > On the other hand, what do you get by allowing ( as an indentifier? > > Significant whitespace is a good thing, but the way it is designed in > Python it has some costs. Can't you simply acknowledge that? One can admit this but what is it worth or how should those costs b

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Kay Schluehr
Bill Atkins wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > > And then the 12th vanished Lisper returns and Lispers are not > > suppressed anymore and won't be loosers forever. The world will be > > The mark of a true loser is the inability to

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Kay Schluehr
Ken Tilton wrote: > Oh, my, you are preaching to the herd (?!) of lemmings?! Please tell me > you are aware that lemmings do not have ears. You should just do Lisp > all day and add to the open source libraries to speed Lisp's ascendance. > The lemmings will be liberated the day Wired puts John Mc

Re: best way to determine sequence ordering?

2006-04-30 Thread Kay Schluehr
> * building a dict of indicies:: > >positions = dict((item, i) for i, item in enumerate(L)) > >if positions['A'] < positions['D']: ># do some stuff > >You'll only get a gain from this version if you need to do several > comparisons instead of just one. Hi Steven,

Classic class conversion

2006-04-24 Thread Kay Schluehr
Just reasoning about conversion of classic to new style classes ( keeping deprecation of ClCl in Py3K in mind ) I wonder if there is a metaclass that can be used to express the semantics of ClCl in terms of new style classes? Intuitively I would expect that there is quite a lot of Python semantics

Re: Strategy Design Pattern

2006-04-21 Thread Kay Schluehr
Daniel Santa Cruz wrote: > Hello all, > > I've been trying to go over my OO Patterns book, and I decided to try > to implement them in Python this time around. I figured this would > help me learn the language better. I guess it might help clarifying what OO is about since you see what happens w

Re: Missing interfaces in Python...

2006-04-19 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > I'm coming from a Java background, so please don't stone me... > > I see that Python is missing "interfaces". The concept of an interface > is a key to good programming design in Java, but I've read that they > aren't really necessary in Python. I am wondering what techn

Re: pre-PEP: The create statement

2006-04-06 Thread Kay Schluehr
Steven Bethard wrote: > Python-Version: 2.6 Have you a rough estimation how many modules will be broken when "create" is introduced as a keyword? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 licensing: stop this change

2006-04-01 Thread Kay Schluehr
Steve Holden wrote: > As the only director of the Python Software Foundation to vote against a > recent Board motion to implement the change in licensing terms described in > >http://pyfound.blogspot.com/2006/04/python-25-licensing-change.html > > I would like to place on record my protest aga

Re: __slots__ in derived class

2006-03-15 Thread Kay Schluehr
Schüle Daniel wrote: > Hello, > > consider this code > > >>> class A(object): > ... def __init__(self): > ... self.a = 1 > ... self.b = 2 > ... > >>> class B(A): > ... __slots__ = ["x","y"] > ... > >>> b=B() > >>> b.a > 1 > >>> b.b > 2 > >>> b.x = 100 > >>> b

Re: Is this possible in Python? SOLUTION FOUND

2006-03-14 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > jalanb wrote: > > You might like the version here: > > http://www.jorendorff.com/toys/out.html > > > > Especially the "need to know" presentation, which is cute > > > > -- > > Alan > > http://aivipi.blogspot.com > > Thank you for the tip. > Meanwhile, I found a shorter s

Re: Is this possible in Python?

2006-03-13 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > Hi > > I wonder if Python is capable of the following: define a function which > returns its argument. > I mean: > def magic_function(arg): > .. some magic code ... > > that behaves the following way: > > assert magic_function(3+4)=="3+4" > assert magic_funct

Re: How to refer to the function object itself in the function per se?

2006-03-11 Thread Kay Schluehr
Sullivan WxPyQtKinter wrote: > I am sorry but you misunderstood my idea. > What I want is a generalized method to print out the function name, or > refer to the name of a function. If I use f.__name__, I think I should > just use print "f" to save my keyboard. What I expect is using a > method, or

Re: How to refer to the function object itself in the function per se?

2006-03-11 Thread Kay Schluehr
Sullivan WxPyQtKinter wrote: > So how > could I refer to the function object per se, in the body of the > function itself? Just use the name. def f(): print f.__name__ >>> f() f -- http://mail.python.org/mailman/listinfo/python-list

Re: New python.org site

2006-03-11 Thread Kay Schluehr
Bertrand Mansion wrote: > On 3/11/06, Steve Holden <[EMAIL PROTECTED]> wrote: > > > "A competition" sounds like a wonderful idea, but suppose there were to > > be one, and a winner were to be declared, where do we go from there to > > get the winning design up on a server behind www.python.org? >

Re: New python.org site

2006-03-11 Thread Kay Schluehr
Luis M. González wrote: > I wouldn't want to sound like I'm criticizing other people's work. > To those who offered their time to create this site, which is quite an > improvement over the old one, thank you! > > However, I like the idea of a contest. Both for the site and for the > logo. > Perhap

Re: Cheese Shop -> BSOL?

2006-03-11 Thread Kay Schluehr
Paul Boddie wrote: > Tim Churches wrote: > > Would it be possible to rename "Cheese Shop" as "Bright Side of Life"? > > Well, you could replay the conversation I gave as an example elsewhere > to see if it sounds ridiculous or not, but what we've encountered here > is the problem of whether someth

Re: Python Evangelism

2006-03-10 Thread Kay Schluehr
Magnus Lycka wrote: > They do this on purpose in the U.S. A country full > of religious fanatics, where it's impossible to be > elected president unless you claim that you are a > devoted Christian and say "God bless America" every > time you open your mouth. Maybe Pythonistas should make a cultu

Re: New python.org website

2006-03-08 Thread Kay Schluehr
Michael Tobis wrote: > > No one > > of the complainers and negativists do claim that they could do it much > > better. > > Indeed, I do not have to be able to write a particular program to > notice it has bugs. > > On the other hand, (since I think the design, while not brilliant, is > good) fixin

Re: New python.org website

2006-03-07 Thread Kay Schluehr
Steven Bethard wrote: > Phoe6 wrote: > > beta.python.org evolved very nice and noticed today the new python.org > > website going live. There is a change in the look n feel, wherein it > > looks "more official" and maximum possible information about python is > > now directly accessible from the

Re: New python.org website

2006-03-07 Thread Kay Schluehr
Michael wrote: > The new website is to blah. It's so light colored across the whole thing > that it kind of just melts away in my mind. Maybe giving a little color > in the menu bar on the right would help. My experience is that white is > a bad background color when over used. I agree. The text i

Re: Peter Naur wins ACM Turing Award

2006-03-07 Thread Kay Schluehr
Colin J. Williams wrote: > Without detracting from the last sentence, I disagree. > > Peter Naur's honour is long overdue. > > Colin W. Sometimes it's hard for me to figure out about what somebody else disagrees with me in particular when I agree with him. Is it possible that Peter Naur was forg

Re: Peter Naur wins ACM Turing Award

2006-03-06 Thread Kay Schluehr
Terry Reedy wrote: > http://campus.acm.org/public/pressroom/press_releases/3_2006/turing_3_01_2006.cfm > > Peter Naur was co-developer of Backus/Naur grammar notation, co-author and > editor of the Algol 60 specification, and co-developer of a successful > Algol compiler. That's very fine. Peter

Re: PEP 354: Enumerations in Python

2006-02-26 Thread Kay Schluehr
Ben Finney wrote: > Metaclass for creating enumeration classes > -- > > The enumerations specified in this PEP are instances of an ``enum`` > type. Some alternative designs implement each enumeration as its own > class, and a metaclass to define common pro

Re: Tail Call Optimization as a Decorator

2006-02-26 Thread Kay Schluehr
Crutcher wrote: > I've tossed it to python-dev, but how do I submit it to the cookbook? http://aspn.activestate.com/ASPN/Python/Cookbook/ I think it is a good place to stay accessible even if python-dev overlooks it. Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Tail Call Optimization as a Decorator

2006-02-26 Thread Kay Schluehr
Crutcher wrote: > This is fun :) > {Note: I take no responsibilty for anyone who uses this in production > code} > > #!/usr/bin/env python2.4 > # This program shows off a python decorator > # which implements tail call optimization. It > # does this by throwing an exception if it is > # it's own g

Re: Is Python a Zen language?

2006-02-26 Thread Kay Schluehr
André wrote: > > If appearing silly is the price of satisfying your curiousity then so > > be it. I would, however, like to point out that there is a well > > established usage of the word "Zen" in computer science. > [snip; excellent answer from John deleted.] > > -John Coleman > > If I may add:

Re: Is Python a Zen language?

2006-02-25 Thread Kay Schluehr
John Coleman wrote: > Ron Stephens wrote: > > Actually, Python has the distinction of being both a great tool > > language *and* a great Zen language. That's what makes Python so cool > > ;-))) > > > > Ron Stephens > > Python411 > > www.awaretek.com/python/index.html > > This would explain why the

Re: A C-like if statement

2006-02-24 Thread Kay Schluehr
Paul Rubin wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > Hmm. A statement has side-effects but it returns no value. And yes, you > > can create a name within an expression producing a value in Python, > > using a list/generator comprehension. The sol

Re: A C-like if statement

2006-02-24 Thread Kay Schluehr
Roy Smith wrote: > Bob Greschke <[EMAIL PROTECTED]> wrote: > >I miss being able to do something like this in Python > > > >1f (I = a.find("3")) != -1: > >print "It's here: ", I > >else: > >print "No 3's here" > > > >where I gets assigned the index returned by find() AND the if statement ge

Re: Unintended inheritance

2006-02-24 Thread Kay Schluehr
Alex Martelli wrote: > Kay Schluehr <[EMAIL PROTECTED]> wrote: >... > > To prevent unintended inheritance C# introduced a relatively complex > > contract semantics using three modifiers virtual, override and new. Is > > this issue serious for Python progra

Re: Python vs. Lisp -- please explain

2006-02-24 Thread Kay Schluehr
Torsten Bronger wrote: > Hallöchen! > > "Paul Boddie" <[EMAIL PROTECTED]> writes: > > > Kay Schluehr wrote: > > > >> I would say yes, it is still "proper Python" in that each RPython > >> program is also a CPython program. &g

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Kay Schluehr
Paul Boddie wrote: > Kay Schluehr wrote: > > Paul Rubin wrote: > > > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > > > I talked to Richard Emslie recently and he told me that the PyPy team > > > > works on a mechanism to create C

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Kay Schluehr
Paul Rubin wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > I talked to Richard Emslie recently and he told me that the PyPy team > > works on a mechanism to create CPython-extension modules written in > > RPython i.e. a statically translateable

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Kay Schluehr
Steven D'Aprano wrote: > But over time, as PyPy, Psycho, and other technologies bear fruit, Python > will speed up, even though it will remain interpreted. I talked to Richard Emslie recently and he told me that the PyPy team works on a mechanism to create CPython-extension modules written in RP

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Kay Schluehr
Alexander Schmolck wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > > Alexanders hypothesis is completely absurd. > > You're currently not in the best position to make this claim, since you > evidently misunderstood what I wrote (I cert

Re: Python vs. Lisp -- please explain

2006-02-20 Thread Kay Schluehr
Steven D'Aprano wrote: > On Mon, 20 Feb 2006 05:18:39 -0800, Kay Schluehr wrote: > > >> What's far more interesting to me, however, is that I think there a good > >> reasons to suspect python's slowness is more of a feature than a flaw: I'd > >

Unintended inheritance

2006-02-20 Thread Kay Schluehr
The problem of unintended inheritance is typical for OO frameworks and can be explained as follows. Given a class Foo implemented by Alice and a derived class Bar of Foo implemented by Bob. Bar implements a method f. In a later version of Foo Alice also implements a method f. The f of Bar overrides

Re: Python vs. Lisp -- please explain

2006-02-20 Thread Kay Schluehr
> What's far more interesting to me, however, is that I think there a good > reasons to suspect python's slowness is more of a feature than a flaw: I'd not > be suprised if on the whole it greatly increases programmer productivity and > results in clearer and more uniform code. Yes, it's Guidos ma

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Kay Schluehr
Roy Smith wrote: > DH <[EMAIL PROTECTED]> wrote: > > -python has true closures (although nothing like ruby's blocks) > > What is a "true closure"? Or, maybe what I'm asking is what kind of > closure wouldn't be a true closure? Is there some kind of ersatz closure > other language try to pass off

Re: ordered sets operations on lists..

2006-02-12 Thread Kay Schluehr
Bengt Richter wrote: > Perhaps newbies should be advised that > > [x for x in l1 if x in set(l2)] But the resulting list is a representative of bag not a set ( contains multiple occurrences of elements ): >>> [x for x in [3, 3] if s in Set([3])] [3,3] Same with Raymonds solution: >>> filt

Slightly OT: Ranking noise

2006-02-12 Thread Kay Schluehr
For those people who use google groups to access comp.lang.python may enjoy now looking at contentess shiny yellow stars - shining brighter than anything else on the site. The only pattern I've found are one or two shiny yellow stars for many newbie postings. According to the staring semantics the

Re: How do I dynamically create functions without lambda?

2006-01-28 Thread Kay Schluehr
Steven D'Aprano wrote: > On Sat, 28 Jan 2006 00:13:28 -0800, Kay Schluehr wrote: > > [snip lambda calculus stuff] > > > In Python you can write: > > > > Y = lambda g: (lambda f: g(lambda arg: f(f)(arg))) (lambda f: g(lambda > > arg: f(f)(arg))) > >

Re: How do I dynamically create functions without lambda?

2006-01-28 Thread Kay Schluehr
Steven D'Aprano wrote: > On Fri, 27 Jan 2006 11:41:56 -0800, Kay Schluehr wrote: > > > > > Russell wrote: > >> I want my code to be Python 3000 compliant, and hear > >> that lambda is being eliminated. The problem is that I > >> want to partiall

Re: How do I dynamically create functions without lambda?

2006-01-27 Thread Kay Schluehr
Russell wrote: > I want my code to be Python 3000 compliant, and hear > that lambda is being eliminated. The problem is that I > want to partially bind an existing function with a value > "foo" that isn't known until run-time: > >someobject.newfunc = lambda x: f(foo, x) > > The reason a nested

Re: beta.python.org content

2006-01-27 Thread Kay Schluehr
The new Python site is incredibly boring. Sorry to say this. The old site is/was amateurish but engaged. Now after ~15 years of existence Pythons looks like it wants to be popular among directors of a german job centers. It aims to do everything right but what could be said worse? The text on the b

<    1   2   3   4   5   6   7   8   >