Remove implicit "neutral values" in __init__

Create issue
Issue #6 on hold
Jean-Tiare Le Bigot created an issue

When an item is created or loaded from the database, fields for which there are no known values are explicitly set to a neutral value like "0", "<empty string>" or

This is redundant with default types constructors. It is also a bad idea to rely on these values when instanciating a new Item. It will thus be removed.

If you need default values to ease objects creation, just use the default dict in your model or the init method

Comments (6)

  1. √Čric Araujo

    Big +1, I find more and more cases where this behavior is actually not helpful (recently when refactoring a class with a datetime field).

  2. Jean-Tiare Le Bigot reporter

    Raise exception in ``init`` and ``from_dict`` when a value is not properly given

  3. Log in to comment