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 ...

RESTful Web Services Design

Date Tags REST
This -- REST is the new SOAP -- has so many demolished strawman arguments that it feels like looking at a van Gogh painting of people harvesting wheat.
I won't dive into listing all the strawmen. Most of my responses are approximately "How is that an actual problem?" or "Yes, it was …
more ...