Closed
Description
Splitting off from #19268 (which is starting to give me unicorns fairly often)
After that, all blocks eventually end up calling Block.__init__
(aside from ScalarBlock
, which we'll ignore).
Most of the subclasses init methods are
- maybe coerce values to the expected dtype
call super().__init__
It'd be nice to put 1 into favor of a _maybe_coerce_values
method defined by each block, and remove all the subclasses init methods.
The one sticking point will be DatetimeTZBlock.__init__
, which accepts a dtype
parameter that no other block does.
pandas/pandas/core/internals.py
Lines 2582 to 2590 in 35812ea
We could maybe push that onto the callers, and then clean things up.