Type Hinting Edge Case

Warning. I'm new to this. Yes, my book Functional Python Programming -- 2nd ed -- is full of type hints. But my examples are all (intentionally) relatively simple. There are edge cases that I do not pretend to understand.

Here's a fun one. Start here

Lazy PyTwitter: Is there some way with …

more ...


Coping with a Spreadsheet Database

A common way to save persistent, important data is a spreadsheet. It provides a handy, potentially normalized store that's readily accessible with minimal tooling. It has a UI usable by people with a spectrum of skills.

Sadly.

There's a core conflict:

  • The advantages of spreadsheets-as-database are numerous.
  • The disadvantage is …
more ...




Should I use x.__len__() or len(x)?

Date Tags #python
In the context of providing type hints, someone had a function like this.
def f(x: Sized) -> Whatever: ...

And, since sized objects have a __len__() method it seemed sensible to use x.__len__(). It was a good question about the use of special methods.
My advice is to avoid using …
more ...


Python Interviews

The #Python Interviews book is out. Mike Driscoll interviewed a bunch of Python experts. And me, too. get 30% off the Amazon paperback version of the book using the code 30PYTHON: https://goo.gl/5A3uhq
Here's a flavor of how this went:

Driscoll: So how did you end up becoming …
more ...