Talin <[EMAIL PROTECTED]> writes:

>    # Use as a function argument constraint
>    @generic
>    def flatten( x:concepts.iterable ):
>       ...
>
>    # Another overload
>    @generic
>    def flatten( x:concepts.associative ):

How are concepts defined?

How is it determined which specialization takes preference when
a function is specialized on several matching concepts?

(With generic functions based on types this is determined by
explicitly declared subtyping.)

> Testing for signatures, how about something like this:
>
>    def function( f:concepts.function( concepts.iterable, int ) )
>
> Which describes a function that takes an argument which is
> a function that takes an iterable and an int.

When such concept is called to test the claim against an object,
how does it determine whether the object is a function which takes
an iterable and an int?

-- 
   __("<         Marcin Kowalczyk
   \__/       [EMAIL PROTECTED]
    ^^     http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to