Skip to content

Beta 0.22.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@jd-develop jd-develop released this 26 Jun 09:35
· 68 commits to main since this release

This version comes with a new huge functionality – optional parameters –, rather big bug fixes, as well as smaller tweaks and fixes.

This version also comes with a brand new documentation.

Added

  • Added optional parameters to function definitions. Use def identifier(mendatory1, mendatory2)(optional1=default_value, optional2=default_value) to define optional parameters. When you call the function, you can omit the optional arguments. If you want to leave optional1 to its default value but to change optional2, you can use identifier(mendatory1, mendatory2, <default>, new_value).
  • Added the <default> token, and the <default> value.
  • Added a new type of comments (NOUGAROIGNORE). They are opened and closed by ..NOUGAROIGNORE or .. NOUGAROIGNORE where . is any character among #@/%!$;. There should not be anything else on lines where there are NOUGAROIGNORE opening or closing statements.

Changed

  • Version ID has been increased to 7.
  • Lib version has been increased to 4.
  • Key "run_noug_dir_work_dir" in BuiltinFunction dictionaries (and in libs too) was renamed to "run_noug_dir".
  • Type of functions is now func, regardless of if they are functions or built-in functions. However, type of methods is still method.
  • Modules and functions are now True in boolean context (i.e. in a condition)
  • round built-in function now returns int if n_digits ⩽ 0, not only for n_digits = 0.
  • __how_many_lines_of_code__ now accepts any value as argument (it checks if the value is true).
  • (Internal API) dived_by and floor_dived_by methods in Values are now renamed to divided_by and floor_divided_by.
  • (Build scripts) (Windows) The Nougaro version is now automatically fetched.

Removed

  • (Internal API) to_str_, to_int_, to_float_, to_list_ methods in Values are now removed. Please use to_str, to_int, to_float and to_list instead.

Fixed

  • Fixed position start and end of duplicate arguments error messages.
  • __test__ and example builtin functions now work from every location in the filesystem.
  • Fixed functions returning None if their return value was interpreted as False (empty string, empty list, …)
  • Fix a potential crash with errors (when an error occurs in an empty line…)