> Currently class instances can not > directly be created asyncronously. > > Yes, there are other means for async > creation. (As we have discussed before, > factories, __new__ is a coroutine, etc) > > However, having all creation logic, under > the class definition and similar to > __init__ is more elegant.
Generally speaking having side-effects in __init__ is a bad idea since it among others inhibits testability. There has been a great blog post on that topic that goes great lengths to plot out all the downsides: http://as.ynchrono.us/2014/12/asynchronous-object-initialization.html Adding async initializers would hence only foster the adoption of anti-patterns. —h
