HackerTrans
トップ新着トレンドコメント過去質問紹介求人

winny314

no profile record

コメント

winny314
·15 日前·議論
Hyundai Motor Group has a 33% stake in Kia, so controls Kia and Hyundai. One corporation somewhere decided to PR align with GrapheneOS. Cool, but not enough.
winny314
·7 か月前·議論
Beached a car and a neighbor kindly brought his 4x4 truck over, lined up the bumpers, gently pushed my car out of the drift. Dude was hella cool.
winny314
·7 か月前·議論
In the first example:

    def create_a_file(filename, size):
        if len(filename) > 16:
            raise ValueError("Invalid filename, more than 16 bytes")
        account = tb.Account(
            id=int.from_bytes(filename.encode()),
            ...
        ...
Is `filename` a str? In which case `len(str)` returns the number of codepoints in the unicode string, not the number of bytes in an encoded representation. Yup the `filename.encode()` sounds like `str.encode()` which itself returns a `bytes` object. Not sure if it matters, but semantically it bugs the heck out of me.