Hi Julien On 3 Mai, 16:02, Julien Puydt <julien.pu...@laposte.net> wrote: > The parent class cannot expect anything if it's initialization code > hasn't been called, can it?
Apparently both the string representation and the hash *are* available before calling init: sage: P_init = Parent(category=Rings()) sage: P_init <type 'sage.structure.parent.Parent'> sage: hash(P_init) 6922428270616034436 sage: P_no_init = Parent.__new__(Parent, category=Rings()) sage: P_no_init <type 'sage.structure.parent.Parent'> sage: hash(P_no_init) 6922428270616034436 Here, I demonstrate that P_no_init is really not initialised: sage: P_init._is_category_initialized() True sage: P_no_init._is_category_initialized() False So, the result is the same with and without initialisation, and indeed the hash *is* called before the initialisation is finished. Thank you for the links! Cheers, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org