In article <[EMAIL PROTECTED]>,
 "Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote:

> [EMAIL PROTECTED] wrote:
> 
> > You can look at this, its API looks very well thought out to me:
> > http://oakwinter.com/code/typecheck/
> > 
> >> Now, on the other hand, if we were to introduce a purely optional
> >> type hint to the function prototype, such as follows:
> >> def multiplyByTwo(value:int): return value * 2
> > 
> > I don't think Python will have something like this...
> 
> It's actually something that has been being considered for Python 3.0
> for a long time.
> 
> Search for `python optional static typing` for discussions - the first
> two links from Google are blog entries by Guido from a year ago (there's
> also a third one linked from PEP 3000).

But surely, never with the proposed semantics (quoted to
match [non]attribution), with automatic conversion of
"14" to 14  --

> >> The python interpreter could do the work of casting the incoming
> >> parameter to an int (if it is not already) before it is multipled,
> >> resulting in the desired result or a typecasting error otherwise.
> >> Furthermore, it could do it more efficiently than a developer having to
> >> put conditional code at the beginning of traditionally typecasting
> >> functions.

I know awk works a bit like that, maybe Perl? but it's
surely way out of place in Python.

   Donn Cave, [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to