Re: Merging Subway and TurboGears

2005-12-19 Thread Jan Niklas Fingerle
[EMAIL PROTECTED] wrote: > My real worries are the controller styles (functions vs classes) and You can wrap those quite easily, but ... > the templating language (Cheetah vs Kid). Those will be points of ... how should the user base of one migrate to the other? I depend on (as far as "depend" m

Re: Merging Subway and TurboGears

2005-12-25 Thread Jan Niklas Fingerle
Jan Niklas Fingerle <[EMAIL PROTECTED]> wrote: > > the templating language (Cheetah vs Kid). Those will be points of > (as far as "depend" might go) the Kid funtionality (i.e. importing > ElementTree-s as sub-trees, and ElementTree is part of the heart of my > appli

Re: Using super()

2006-07-19 Thread Jan Niklas Fingerle
Pupeno <[EMAIL PROTECTED]> wrote: > class MyConfig(ConfigParser, object): > def add_section(self, section) > super(MyConfig, self).add_section(section) > > seems to work and as expected. Is there anything wrong with it ? yes. (1) There's a colon missing in the def-line. ;-) (2) Th

Re: Jumping over in the class hierarchy

2006-08-01 Thread Jan Niklas Fingerle
Pupeno <[EMAIL PROTECTED]> wrote: > be correct to do: super(A, super(B, self)).method() in C ? Why do you want to use super? Is there any diamond shaped inheritance in sight? Anyway, have you actually tried, what you suggested? Well, ... --8<---

Re: refering to base classes

2006-08-30 Thread Jan Niklas Fingerle
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > I suppose "this" refers to the use of super() ? If so, I wouldn't say > it's "superior", but it can be helpful with complex inheritence scheme ... which aren't anywhere in sight. Don't start using super() until you need diamond shape inheritance (n

Validating CSS in python

2006-09-12 Thread Jan Niklas Fingerle
Hi, I want to validate CSS in python. I could take the grammar from w3.org [1] and throw it against one of the many python parsing libraries, but I still hope there's a ready-to-use solution somewhere around. The big point is that I don't want to *understand* CSS, I just need to validate it (and

Re: "Wiki in 10 minutes"

2006-10-01 Thread Jan Niklas Fingerle
Michiel Sikma <[EMAIL PROTECTED]> wrote: > lost my bookmarks. I once bookmarked this video tutorial which > allegedly showed how to make a wiki in 10 minutes with some Python > network framework. Does anybody know which one it might have been? If you add another ten minutes, this would be ht

Re: super(...).__init__() vs Base.__init__(self)

2006-02-09 Thread Jan Niklas Fingerle
Steven Bethard <[EMAIL PROTECTED]> wrote: > Personally, I'd call the lack of the super calls in threading.Thread and > Base bugs. It can't be a bug since it wasn't a bug before super was introduced and you don't wan't to break working Python-2.x-code. > But __init__() is definitely a tricky c

Re: super(...).__init__() vs Base.__init__(self)

2006-02-12 Thread Jan Niklas Fingerle
Tony Nelson <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Jan Niklas Fingerle <[EMAIL PROTECTED]> wrote: > > > ...Super is a good tool to use, when dealing with > > diamond shape inheritance. In any other case I would use the direct >

Re: super(...).__init__() vs Base.__init__(self)

2006-02-12 Thread Jan Niklas Fingerle
Steven Bethard <[EMAIL PROTECTED]> wrote: > Jan Niklas Fingerle wrote: > > Steven Bethard <[EMAIL PROTECTED]> wrote: > >> Personally, I'd call the lack of the super calls in threading.Thread and > >> Base bugs. > > > > It can't b

Re: multiple inheritance

2006-02-15 Thread Jan Niklas Fingerle
Sébastien Boisgérault <[EMAIL PROTECTED]> wrote: > and search for the "cooperative methods and super" section > in http://www.python.org/2.2/descrintro.html ..., then read http://fuhm.org/super-harmful/ (not the evangelism, just the examples) and http://mail.python.org/pipermail/python-dev/2005-J

Re: a question about zip...

2006-03-08 Thread Jan Niklas Fingerle
KraftDiner <[EMAIL PROTECTED]> wrote: > [(0, 1), (2, 3), (4, 5), (6, 7)] > > Which is a list of tuples.. I wanted a tuple of tuples... >>> odd = (1,3,5,7) >>> even = (0,2,4,6) >>> all = zip(even, odd) >>> all [(0, 1), (2, 3), (4, 5), (6, 7)] >>> tuple(all) ((0, 1), (2, 3), (4, 5), (6, 7)) Cheers

Re: why isn't Unicode the default encoding?

2006-03-20 Thread Jan Niklas Fingerle
John Salerno <[EMAIL PROTECTED]> wrote: > to convert back and forth. But why isn't Unicode considered a regular > string by now? Is it for historical reasons that we still use ASCII and > Latin-1? The point is, that, with a regular string, you don't know its encoding or whether it has an encodi

Re: why isn't Unicode the default encoding?

2006-03-20 Thread Jan Niklas Fingerle
Robert Kern <[EMAIL PROTECTED]> wrote: > > I see UTF-8 a lot, but this particular book also mentions that UTF-16 is > > the most common. Is that true? > > I think it unlikely, but I have no numbers to give. And I'll bet that that > book > doesn't either. I haven't got any numbers, but my guess