i think you did the weight approximation in the wrong order, 1024 is a lot bigger than 6×1023. so you can probably double the final weight.
lime!
- 0 Posts
- 38 Comments
i think we’re talking about different things. you use enforce to mean “validate”, i used it to mean “coerce”. one of the cases was a command line argument parser that consisted of a single decorator, so you could write
@command def foo(bar: int, baz: float): print(baz * 2 + bar * 3)
and call it with
$ myfile.py foo --bar 3 --baz 2.2
and it would print 13.4another was about creating working protocol buffers from an excel sheet, nested types and enums and oneofs and everything. we used it to parameterize tests of our bluetooth protocol.
i mean, i’m all for rejiggering the internals. i’ve personally written at least two libraries that uses type annotations in reverse to force arguments into the correct type, and i feel like that should probably be a separate mechanism to “just call the annotation”
the problem is that the language doesn’t and can’t support one single way to use type annotations without changing fundamental functionality. you can absolutely hook up mypy to your editor for newbies, but once you get on the intermediate level, fighting with mypy takes more code than actually solving the problem.
also there was that proposed update to mypy that was put on held when it turned out that the maintainers didn’t know how annotations are used in the wild.
no, the linked table shows how python also returns the first non-falsey result of an
a or b
expression rather than just giving a boolean. it’s useful for initialising optional reference args:def foo(a: list = None) a = a or []
works with
and
as well.
yeah but rednax wasn’t.
only if you design it using llvm. llvm is pretty new.
it can also not be.
none of these are race conditions, they’re just runtime errors. python only parses code when it is about to run that block so you can absolutely get a crash from bad indentation.
in my experience, the js world’s focus on developer ergonomics has absolutely yielded some insane situations where running an installed script has caused it to start downloading more dependencies. however, this has unfortunately started happening in python too lately.
only true if your language compiles to c. fortran peeps are safe.
that means you fit in here <3
surely you must be after something specific?
wdym “thoughts”?
other way around. they pivoted to offering enterprise solutions based on ai interpretations of their database to business customers. only they were too slow, since everyone had already scraped them.
well yeah they went all in on ai.
neeeeerd
i see you haven’t had to pleasure of using office 365
yeah yeah, cosmological approximations and all that, but there’s still a bit of difference between “planetoid” and “gas giant” :P