rev

joined 1 year ago
MODERATOR OF
[–] [email protected] 1 points 1 year ago

Any time you need different behavior between static type checking and runtime.

in 3.10 I’m using it to work around issue with NamedTuple generics. typing_extensions.NamedTuple allows Generics at runtime but typing.NamedTuple doesn’t. But the type checker we are using doesn’t support typing_extensions.NamedTuple like it does for the typing version so we lie at type checking time to get the typing to make sense but have different runtime type because otherwise its a TypeError

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

IMHO programs don’t belong on pypi only libraries. Its a waste of namespace.

Explicit is better than implicit, read the zen of python(its short). Don’t be too magical. Don’t reach for a class if you have no state. Watch some jackdied talks from old pycons. You don’t need custom exceptions the stdlib has plenty. Also if its not documented don’t use it. Don’t use star imports.

Black just use it don’t fight it, don’t waste brain space with formatting rules. “You can have any formatter you want as long as its black”. Use default black settings. People who don’t are heretics :P

sys.path or PYTHONPATH is how imports are resolved. Much like shells looking for binaries. IMHO you should never adjust either. The current directory is always added to sys.path. but beyond that directories are packages. Use __init__.py when you want to provide a module for what happens when you import a package.

python3.11 -m venv .venv

This is how you should create your venv. After that activate it and use pip. You should setup a requirements.txt for your project, then you can use pip -r to configure your env. Global install of third-party libraries is always a bad idea in practice. Version constraints make that almost impossible these days.

[–] [email protected] 27 points 1 year ago (1 children)

python is like this also. I don’t remember a language that returned ints

[–] [email protected] 1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago

I guess it may depend on the rights of scooter. He may only have rights to the recordings themselves and not the lyrics.

[–] [email protected] 1 points 1 year ago

The “mainstream” media has not been mainstream for years. News Paper replaced the town criers. Radio Replaced News Papers. TV replaced Radio. Internet replaces legacy media. Its just how this works. The future is not centralized. There will never be a time again where 3 broadcast networks are allowed to control the news. This is good

[–] [email protected] 133 points 1 year ago (3 children)

I got a promotion. There was no raise in salary just expectations of more responsibilities. I got a $100 visa gift card. I saw that as a big fuck you. I was out as soon as I could manage.

[–] [email protected] 11 points 1 year ago

https://en.m.wikipedia.org/wiki/Wickard_v._Filburn

Insanity has been an ever present factor for the court.

Not engaging in interstate commerce effects interstate commerce. So everything effects interstate commerce, wow.

[–] [email protected] 1 points 1 year ago

I want the scout

[–] [email protected] 1 points 1 year ago (3 children)

Remote work

[–] [email protected] 2 points 1 year ago

sure but If I need something fast and don’t want to roll dice and raise suspicions

[–] [email protected] 8 points 1 year ago (3 children)

If I can have ai generate npcs and monsters that would be awesome

view more: ‹ prev next ›