pepoluan
pepoluan.bsky.social
pepoluan
@pepoluan.bsky.social
IT Security / Architecture / Infra guy.
Also doing some Python things.
Kind of related:

If you use nargs="?", use Ellipsis as default, like so:

parser.add_argument("--opt", nargs="?", default=Ellipsis)

If --opt not specifed, Ellipsis will be returned.
If --opt is specified but no argument, None will be returned.

#PythonProgramming #PythonTips #Python
August 21, 2025 at 10:43 AM
Here's a #PythonProgramming tip:

When configuring the logger using a dict,
Grab the inside contents using the walrus.
(Pic 1)

That makes it easier to modify later.
(Pic 2)

[ _opts is of course the "Namespace" object returned by argparse.ArgumentParser().parse_args() ]
July 22, 2025 at 3:51 AM
I cannot swipe left to see who are being suggested for me.
I'm on the Android Bluesky app.
Who can I complain to?
March 28, 2025 at 4:14 PM
Bluesky now has over 10 million users, and I was #9,663,567!
October 8, 2024 at 3:38 AM