types.Float.weakref
Method on every
floatweakref(): any
Returns the float itself.
Return value
this, unchanged - not a weakref value.
Notes
A float is never reference counted, so there is nothing for sq_weakref to point a real weakref at; see types.Integer.weakref for the full mechanism, including why the signature's shown receiver, (table|userdata|instance|class|null), does not name float either.
Example
// Floats are not reference counted either, so this returns the value itself.
let wr = (3.5).weakref()
println("wr =", wr)
println("type(wr) =", type(wr))Output:
wr = 3.5
type(wr) = floatSee also
weakref | Returns the integer itself. |
weakref | Returns the bool itself. |
clone | Returns the float itself. |
| float | class index |