Functional programming

Antoon Pardon antoon.pardon at rece.vub.ac.be
Wed Mar 5 10:09:28 CET 2014


Op 04-03-14 16:18, Steven D'Aprano schreef:
> Depends on the type: I suppose you can draw an analogy between records or 
> structs and classes with no methods.
>
> But I'm not talking about creating types, I'm talking about type 
> declarations.
>
> int x=2;  # 2 is an int? Who would have guessed!

How about:

decimal[precision=4] x = 2.6;
int[min = -10, max = 20] n = 7;

-- 
Antoon Pardon



More information about the Python-list mailing list