a couple of questions: pickling objects and strict types

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Apr 5 16:30:18 EDT 2013


On Fri, 05 Apr 2013 12:59:04 -0600, Littlefield, Tyler wrote:

> Hello all:
> I've been using Python for a while now, but I have one larger problem. I
> come from a c++ background; though it doesn't help in catching runtime
> errors, being able to compile a program helps catch a lot of syntax
> errors. I know about pychecker, which is somewhat useful. Do people have
> other methods for handling this?


Do you tend to make a lot of syntax errors?

Python also catches syntax errors at compile-time. I won't speak for 
others, but I hardly ever make syntax errors: between Python's simple, 
surprise-free syntax, and modern, syntax-colouring editors, I find that I 
rarely make syntax errors.


> Also, I'm depickling objects. Is there a way I can force pickle to call
> the object's ctor? I set up events per object, but when it just
> deserializes it doesn't set all that up. Thanks,

What's the object's ctor? What sort of objects are you dealing with?



-- 
Steven



More information about the Python-list mailing list