Hacker Timesnew | past | comments | ask | show | jobs | submit | eirki's commentslogin


FastApi very recently added support for Annotated, and now recommends using that over default arguments.

https://fastapi.tiangolo.com/release-notes/#0950



I absolutely agree about fixtures-as-arguments thing. Ward does this a lot better, using default values for the fixture factory. There's a long issue on ideas to implement something like that as a pytest plugin (https://github.com/pytest-dev/pytest/issues/3834), but it seems the resulting plugin relies on something of a hack.


Different time period, but definitely check out History of the Twentieth Century.

https://podcasts.apple.com/us/podcast/the-history-of-the-twe...


I also switched to just recently. Nice and simple syntax, and a very satisfying verb:

  just push
  just test


Also chiming in to say thanks for the good work! This looks like an amazing release - I practically jumped in excitement when I saw the fish style autocomplete.


Thanks, it's a late Christmas present if you celebrate it. Or any other relevant occasions.


I just wish I could disable the type coercion. E.g. 1 becomes "1" if the attribute is annotated str.


My recommendation is to get into the habit using StrictStr, StrictInt and StrictFloat as your choice of types to start off with and use str, int, float etc only when coercion is acceptable.

Coercion is quite powerful and saves me quite a bit of work. I write validation for config files that non programmers create. I would happily avoid explaining the difference between a 1 and a "1" to them whenever I can and let coercion do the work. It reduces the mental load on them too.


Isn’t that the allow_mutation parameter of the field function?

https://pydantic-docs.helpmanual.io/usage/schema/#field-cust...


Disabling mutation prevents you from changing attributes after instantiation, no?


Does it not lack a proper æ?


Sorry for late response, but no. RightAlt+q gives æ, RightAlt+w gives å and RightAlt+l gives ø.


I think the comparison between VS Code and Chrome is spot on. Monoculture in the text editor/IDE space is a very real risk right now.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: