Re: [Tutor] is it possible to call a setter property during classinstantiation?

2010-08-14 Thread ALAN GAULD
so we don't usually care too much about types. Are you sure you really need all that type checking code? ...I included a type check for a string to make sure that a future programmer (or myself) wouldn't try to pass in a list of lines after a text has been split. Other code internal to the

Re: [Tutor] is it possible to call a setter property during classinstantiation?

2010-08-13 Thread Alan Gauld
Serdar Tumgoren zstumgo...@gmail.com wrote Does anyone know if it's possible to call a property setter inside of a class's init method? Below is a code sample of what I'm trying to do. Yes and that bit has been answered. But... I have a class with an init method that is getting bloated

Re: [Tutor] is it possible to call a setter property during classinstantiation?

2010-08-13 Thread Serdar Tumgoren
I have a class with an init method that is getting bloated with error-checking guard clauses. Thats very strange. We don't usually have to check types in Python, it is a dynamic language and we can use duck-typing and exceptions so we don't usually care too much about types. Are you