IT Nursery
PHP 7 introduces return type declarations. Which means I can now indicate the return value is a certain class, interface, array, callable or one of the newly hintable scalar...
  • June 3, 2022
  • 0 Comments
Using Python 3’s function annotations, it is possible to specify the type of items contained within a homogeneous list (or other collection) for the purpose of type hinting in...
  • May 25, 2022
  • 0 Comments
I’m trying to split my huge class into two; well, basically into the “main” class and a mixin with additional functions, like so: main.py file: import mymixin.py class Main(object,...
  • May 24, 2022
  • 0 Comments
Suppose I have a function: def get_some_date(some_argument: int=None) -> %datetime_or_None%: if some_argument is not None and some_argument == 1: return datetime.utcnow() else: return None How do I specify the...
  • May 16, 2022
  • 0 Comments