Closed GoogleCodeExporter closed 9 years ago
thanks! :D
python rfc822.py junk.txt also crashes, because it tries to do a method call on
None.
I don't think we want to check each method call for None, so I'm afraid this
can't be fixed.. it shouldn't really matter though, because we assume a program
has been tested with CPython, before being compiled with shedskin.
Original comment by mark.duf...@gmail.com
on 10 Nov 2010 at 9:40
Ideally, the type inference system should track types which can contain "None"
values. If it can't determine that "None" is not a possible value, a run time
check should be generated. After all, Python programs can catch "NoneType" as
an exception.
It's also really tough for users to diagnose these errors. Only programmers
who know Python, C++, and how to debug machine-generated C++ will be able to
fix such errors.
However, I can understand deferring work on the issue. There are higher
priorities.
(Despite all the issues I'm submitting, quite a bit of library code is now
working. So far, there's been nothing I haven't been able to work around.)
Original comment by na...@animats.com
on 10 Nov 2010 at 6:06
Actually, if you're calling a function on a None (null) then the program is
faulty, not Shed Skin. If you were to write such a program in C++, you'd get a
segfault in just the same way. What you gain with Shedskin is the ability to
run your code in Python (slower) and then compile to C++ and machine code for
speed. You get the best of both worlds, but not in both worlds.
Original comment by fahh...@gmail.com
on 10 Nov 2010 at 7:12
Original issue reported on code.google.com by
na...@animats.com
on 10 Nov 2010 at 4:50Attachments: