Showing posts with label question. Show all posts
Showing posts with label question. Show all posts

2007-06-26

Has anyone been able to build and run my security work?

So far I only know of two people who have checked out the security work kept in the bcannon-objcap branch. The first one gets an error the instant he tries to launch the interpreter (but I don't have any debugging info to help with that). The second person can't get the linker to play nicely.

Has anyone gotten it to work? The last thing I want to know is I am the only person in the world who can build and run this thing. I don't know anything about embedding Python, especially considering my build_secure_py.sh script is doing it in the checkout directory, so I am at a loss as to what that shell script is doing wrong.

Anyway, if you have managed to get the code checked out, built, and ran run_security_tests.py (with a standard Python interpreter), please let me know!

2007-03-21

Informal poll: interface of exceptions

I made three mistakes when removing indexing/slicing on exceptions. When I came across ``exc[0]`` I translated it to ``exc.message`` instead of ``exc.args[0]``. There is an important difference, though, between using 'message' and 'args' as the former can be the empty string while args[0] has a value if more than a single argument is passed in. I had not even realized I had made the mistake until Guido pointed it out to me.

With this subtlety, along with how painful it will be to remove 'args' from exceptions (which I have done for the core and anyone at the PyCon sprint can tell you frustrated me to no end), my question is would people miss 'message'? As of right now it has odd semantics because it was added in 2.5 in hopes of removing 'args' and having exceptions only accept a single argument by default, thus we didn't want people to rely on 'message' and think that only one argument was passed in. But if 'args' ends up staying because the transition off of it cannot be done reasonably then is 'message' even worth keeping? The attribute could change to just args[0], but that does not seem useful.

If you happen to have an opinion please leave a comment.