>
> I wonder if it would make sense to go further and merge *both* of these
> features into regular classes.
>
> Checking for @abstractmethod in type.__new__ surely can't be that expensive,
> can it?
>
But it affects startup time.
It iterate all of the namespace and tries `getattr(obj,
INADA Naoki
On Fri, Jul 21, 2017 at 2:59 AM, Ivan Levkivskyi wrote:
> On 20 July 2017 at 19:51, INADA Naoki wrote:
>>
>> On Fri, Jul 21, 2017 at 12:12 AM, Ivan Levkivskyi
>> wrote:
>> > To be honest,
On Jul 20, 2017 05:39, "INADA Naoki" wrote:
Hi, Victor.
> Why not making abc faster instead of trying to workaround abc for perf
> issue?
Current ABC provides:
a) Prohibit instantiating without implement abstract methods.
b) registry based subclassing
People want
On 20 July 2017 at 19:51, INADA Naoki wrote:
> On Fri, Jul 21, 2017 at 12:12 AM, Ivan Levkivskyi
> wrote:
> > To be honest, I am not very happy with addition of a new special class.
> > Imagine that the PEP 544 will be accepted (and I hope so).
> >
On Fri, Jul 21, 2017 at 12:12 AM, Ivan Levkivskyi wrote:
> To be honest, I am not very happy with addition of a new special class.
> Imagine that the PEP 544 will be accepted (and I hope so).
> Then we would have, abstract classes, abstract base classes, and protocols.
> I
To be honest, I am not very happy with addition of a new special class.
Imagine that the PEP 544 will be accepted (and I hope so).
Then we would have, abstract classes, abstract base classes, and protocols.
I think users will be overwhelmed by having
three similar concepts instead of one.
I think
Good discussion so far. Please let me know if I can help with
implementation or documentation.
On Thu, Jul 20, 2017 at 8:40 AM INADA Naoki wrote:
> Hi, Victor.
>
> > Why not making abc faster instead of trying to workaround abc for perf
> > issue?
>
> Current ABC
Hi, Victor.
> Why not making abc faster instead of trying to workaround abc for perf
> issue?
Current ABC provides:
a) Prohibit instantiating without implement abstract methods.
b) registry based subclassing
People want Java's interface only wants (a). (b) is unwanted side effect.
Le 20 juil. 2017 3:49 AM, "INADA Naoki" a écrit :
> I'm +1 with your idea in performance point of view.
(...)
But ABC is too heavy to use only for checking abstract methods.
It uses three inefficient WeakSet [1] and it overrides isinstance and
issubclass
with slow Python