Stefan Behnel wrote:
Martijn Faassen wrote:
Stefan Behnel wrote:
* I prefer tuple unpacking of the 'tag_tuple' ('name'), like this. I also don't think it's necessary to have a template for such a simple thing as "{%s}%s"; repeating it a few times is actually less text than using the template... No need to make it a unicode string either, though it doesn't matter much in this case.
That simplifies things, guess I can remove the template then.
Okay, cool, are you going to use the tuple splitting too?
Yes, but not everwhere. It only unnecessarily clutters the function with variables. I mean, how many different variable names can you imagine for "namespace_uri" and "tag_name"? And why would you want to use them all?
I'm not sure what you mean by this, why would I want to imagine lots of variable names for this? I was talking about using explicit names instead of foo[0] and foo[1]. You split the tuple somewhere in the beginning of the function, right? namespace_uri, localname = .. or even directly in the function arguments (if Pyrex supports it); def startElementNS((namespace_uri, localname), ..): Regards, Martijn