[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Random thought: type(v) -> type, subtype, ... ?
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 6 Feb 2017 09:21:10 +0200
On Fri, Feb 3, 2017 at 9:25 AM, Xianfu Pan <pxfgod@gmail.com> wrote:
> 2017-01-27 21:22 GMT+08:00 Kim Alvefur <zash@zash.se>:
>> type(1.0) -> "number", "float"
Changing a basic function like `type` to return more than one value
can cause strange problems.
t = {type(1.0}
So #t becomes 2, not 1. This also bites when calling type() as the
last argument of a function. Then to be sure, need to say (type(v)) to
discard the second value.