Python and generic programming

Josiah Carlson jcarlson at
Thu Oct 21 21:18:00 CEST 2004

> I wonder, does Python support generic programming paradigm, and to what extent
> (I guess, it doesn't do it in full)? And (or) does it move in that direction?
> Will we ever see
> concept WellAlright:
>    ...
> constructs in Python?
> Isn't it right time to reserve "concept" as a keyword ;-)

Perhaps you meant something different, but  C++ style generic (template)
programming is not necessary in Python.

With decorators, there is an easy method for generating per-argument
type checking and dispatch for functions and methods.

As Python does runtime type checking, if you care to support different
types of arguments even without decorators, one is able.

 - Josiah

More information about the Python-list mailing list