A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-September/028738.html below:

[Python-Dev] type categories

[Python-Dev] type categoriesAahz aahz@pythoncraft.com
Thu, 12 Sep 2002 21:23:06 -0400
On Sat, Aug 24, 2002, Guido van Rossum wrote:
>
> Why do keep arguing for inheritance?  (a) the need to deny inheritance
> from an interface, while essential, is relatively rare IMO, and in
> *most* cases the inheritance rules work just fine; (b) having two
> separate but similar mechanisms makes the language larger.
> 
> For example, if we ever are going to add argument type declarations to
> Python, it will probably look like this:
> 
>     def foo(a: classA, b: classB):
>         ...body...

I'm curious, and I don't recall having seen anything about this: why
wouldn't we simply use attributes to hold this information, like
__slots__?  After all, attributes get inherited, too, and there's no
need to pretzel the syntax.  Using attributes IMO would make it easier
to handle the case where derived classes need to mangle type and
interface declarations.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4