kindall

Seattle, WA

engyrus.com

Age: 46

I'm a technical writer at Tecplot, Inc., makers of fine data visualization software for aerospace/CFD, oil and gas exploration, and general scientific/engineering uses. Python is my Swiss Army Knife of choice. I use it to help build and validate our documentation and help, among other things. I also have some proficiency with HTML, XML, AppleScript, C#, C, and if anyone ever has a question about 6502 assembly language, I'm your man. :-)

I occasionally do Python-related blogging at http://www.engyrus.com/.

16h
answered Parsing local versus online HTML page using PyQuery in Python
2d
answered In-place quicksort - python
Dec
19
comment Replace only some arguments by name in a string with python str.format()
Yes, it's the same thing. As noted, it works in Python 3 but not Python 2.x.
Dec
19
comment Replace only some arguments by name in a string with python str.format()
It works with % string interpolation, though.
Dec
19
comment Replace only some arguments by name in a string with python str.format()
The reason that this doesn't work is that the ** unpacking of the dictionary creates a regular dict, so the __missing__ functionality is lost.
Dec
19
comment Why can you overload __radd__ and not __rmod__ on string?
The point is, sometimes str.__add__ gives up, which allows Dummy.__radd__ a chance. str.__mod__ doesn't give up, so Dummy.__rmod__ isn't given a chance. If a non-reflected method can do the job, the reflected version on the other type is never called, because it doesn't need to be.
Dec
19
answered Why can you overload __radd__ and not __rmod__ on string?
Dec
18
comment Convert spaces to %20 in list
The urllib answer is, arguably, preferable because it makes your intent clearer: you are URL-encoding the string. Replacing spaces with %20 is how you are doing it (assuming spaces are the only thing you need to worry about). Writing code that explains itself is better.
Dec
18
comment Quirky output python
This is clearly explained in the Python documentation.
Dec
17
answered How to get Case Insensitive Python SET
Dec
16
answered What is the "parameter unpacking" error in pylint 1.4?
Dec
15
comment Pygame Class and __init__
That's not what I'm objecting to. It doesn't appear you're using them. If you're not using them, don't pass them in. If you're passing them in, then use them. One or the other, not neither.
Dec
15
comment Pygame Class and __init__
There's only one method there. Why are you passing in word and letter if you're using lesson to determine them?
Dec
12
comment Python __index__ special method
While dict uses hashes, you won't be able to make this behave the way you want by just implementing __hash__... I believe you also need __eq__.
Dec
12
answered IndexError: list index out of range Why?
Dec
12
answered How to invoke a method with the methods name as a string
Dec
11
comment Which language best supports UTF-8 out-of-the-box, Lua or Python?
This is an opinion-based question and will probably soon be closed, but Python 3 is more suitable than Python 2, as the former's string type is Unicode.
Dec
10
comment Python When to OOP and When Not to OOP
Yes, it is perfectly normal to make a container class, and basing it on an existing container is typical. You can even use multiple containers as part of the class (for example, in this case you might have a dictionary to keep track of all the cakes that have icing or not). You can update this when adding or removing the cake. Doing this judiciously will make adding and removing a little slower, but finding particular items a lot faster.
Dec
10
comment Trying to convert a nested loop with two sequences into a lambda
Yeah, no. Fire that boss immediately.
Dec
10
comment Trying to convert a nested loop with two sequences into a lambda
Why does it need to be a lambda? There is no difference between a lambda and a regular function from the point of view of any routine you might call.
1 2 3 4 5