Re: PEP 350: Codetags

2005-10-03 Thread Magnus Lie Hetland
y of the tags) is grouped along with the tag. One can dhen optionally add the <...> stuff at the end. (Not sure if that would be my preferred syntax for it, but I won't complain as much about that as about the empty '<>' thing :) -- Magnus Lie Hetland "The early b

ANN: Beginning Python (Practical Python 2.0)

2005-10-19 Thread Magnus Lie Hetland
n can be found at http://hetland.org/writing/beginning-python Thanks, - Magnus -- Magnus Lie Hetland"Preparing to stand by." http://hetland.org-- Microsoft Windows -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Beginning Python (Practical Python 2.0)

2005-10-21 Thread Magnus Lie Hetland
out also has an effect. -- Magnus Lie Hetland"Preparing to stand by." http://hetland.org-- Microsoft Windows -- http://mail.python.org/mailman/listinfo/python-list

Python Challenge on BBC

2005-08-11 Thread Magnus Lie Hetland
se P.C. levels... ;) -- Magnus Lie HetlandFall seven times, stand up eight http://hetland.org [Japanese proverb] -- http://mail.python.org/mailman/listinfo/python-list

Re: Limited XML tidy

2005-08-25 Thread Magnus Lie Hetland
d from >any other sax handler?) What I ended up doing was using an SGML parser (sgmlop) instead. It's highly forgiving (even of illegal entities and the like) but gives me the information I need. Might be worth a look in your app too? >Toby -- Magnus Lie Hetland http://hetland.org -- http:/

Re: PEP 246 revision

2005-03-04 Thread Magnus Lie Hetland
bject for such special calls -- and thus uses object.__call__ instead, which (obviously) instantiates the class just like we want it to. So: The scenario needn't be as complex as in your example, as long as you use instances instead of classes as protocols. (I guess the case could be made for

Re: PEP 246 revision

2005-03-08 Thread Magnus Lie Hetland
ess that it does not work with the new version of PEP 246. Why not? There's nothing wrong with classes (or anything else) being protocols...? AFAIK, the current version of the PEP was specifically rewritten in order to fit the BDFL blog (as stated in the PEP). [snip] I don't q

sgmlop: malformed charrefs?

2005-03-17 Thread Magnus Lie Hetland
Unicode character) -- is it possible to ignore it (or replace it, as with encode/decode)? I'm trying to write a parser that will accept *any* input text without complaining -- but simply trapping this exception would seem to disrupt the parsing process... Thanks, - Magnus -- Magnus Lie Hetla

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Magnus Lie Hetland
In article <[EMAIL PROTECTED]>, Fredrik Lundh wrote: >Magnus Lie Hetland wrote: [snip] >with sgmlop 1.1, the following script > >class entity_handler: >def handle_entityref(self, entityref): >print "ENTITY", repr(entityref) > >parser = sgmlop.XML

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Magnus Lie Hetland
PyXML.) > I'm pretty sure they've forked the code (there's no UnicodeParser in > the effbot.org edition), Does it deal with Unicode at all? I.e., can I, for example, feed it a Unicode object? > and I have no idea how things work in the fork. I see. -- Magnus Lie Hetland

Re: sgmlop: malformed charrefs?

2005-03-18 Thread Magnus Lie Hetland
in that at the moment)? Using UTF-8 or something would be completely acceptable to me, as long as it works. (Maybe simply feeding it UTF-8 strings would work as it is? Except for Unicode charrefs, of course... Or?) - M -- Magnus Lie Hetland Time flies like the wind. Fruit flies

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Magnus Lie Hetland
efinitely* use these. Hot 100% sure about the names, though. (add() and append() seem like more natural names -- but they may be confusing, considering their other uses...) +1 on both (possibly allowing for some naming discussion...) -- Magnus Lie Hetland Time flies like the win

Positions of regexp groups

2005-04-08 Thread Magnus Lie Hetland
Just a quick question: Does anyone have a simple way of finding the positions (start, end) of the groups in a regexp match? AFAICS, the re API can only return the contents...? -- Magnus Lie HetlandFall seven times, stand up eight http://hetland.org

Re: Positions of regexp groups

2005-04-10 Thread Magnus Lie Hetland
In article <[EMAIL PROTECTED]>, Tim Peters wrote: >[Magnus Lie Hetland] >> Just a quick question: Does anyone have a simple way of finding the >> positions (start, end) of the groups in a regexp match? AFAICS, the re >> API can only return the contents...? > >Rea

./pyconfig.h?

2005-04-12 Thread Magnus Lie Hetland
ss I was standing in that very directory when compiling; maybe there's some mix-up there? -- Magnus Lie HetlandFall seven times, stand up eight http://hetland.org [Japanese proverb] -- http://mail.python.org/mailman/listinfo/python-list