Abstracting away the type of a property
- by L. De Leo
In Python luckily most of the times you don't have to write getters and setters to get access to class properties. That said sometimes you'll have to remember that a certain property is a list or whatnot and a property would save you there by abstracting the type and providing a setter to add something to such list for example rather than exposing the list directly.
Where do you draw the line between exposing the type directly or wrapping its access in a property? What's the general "pythonic" advice?