To make it easier to write --init-- functions, defclass will now check
any (setv) expressions (and its property list), to find any --init--
declarations, and append a nil to the end.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
On 21 September, all the continuous integration checks on a revision of
pull-request #920 were observed to fail with a "CoverageException:
Unrecognized option '[run] exclude_lines=' in config file
.coveragerc". One can only imagine that this was due to it trying to use
the new version 4.0 of Ned Batchelder's ever-popular coverage.py (just
released on 20 September), with which our existing .coveragerc would
seem to have not been compatible.
Re-indent `fib` examples to match that in original blog post - "Indentation shall be two spaces, except where matching the indentation of the previous line"
For easier macro writing purposes, allow an empty (cond), that simply
returns nil. Closes#904.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
To mirror the behaviour of (setv), allow an empty (del) too: one that
shall return nil. Closes#905.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
To allow classes to have methods that match built-in names, yet, still
disallow them outside of defclass, keep an internal state whether
builtins are allowed in the current context.
By default, this is false. But defclass will set it to True when it
compiles its body, and set it back to the previous value when it's done
with that. We need to set back to the previous value to allow nested
defclasses to work properly.
This closes#783.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Strip the \ufdd0 prefix from the keyword argument before turning it into
a string: the same representation the user entered looks better, and is
printable too, thus Python2 doesn't choke on it.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>