Instance of class "object"

castironpi castironpi at gmail.com
Fri May 16 11:36:25 EDT 2008


On May 16, 4:26 am, Peter Otten <__pete... at web.de> wrote:
> 甜瓜 wrote:
> >     I wonder why below does not work.
>
> > a = object()
> > a.b = 1        # dynamic bind attribute failed...
>
> The implementation of slots depends on that behaviour:
>
> http://docs.python.org/ref/slots.html
>
> > Does this strange behavior break the LSP (Liskov substitution principle)?
>
> Can you expand on that?
>
> Peter

Yes I can.  But what is LSP?



More information about the Python-list mailing list