❔ on Nostr: sh1marin black 把這段改成這樣了: trace_file = ( ...
sh1marin (npub1w84…pmwq) black 把這段改成這樣了:
trace_file = (
f"+trace_file={args.trace_output_file}"
if args.trace_output_file
else f"+trace_file={args.output_dir}/trace.fst"
if args.trace
else ""
)
或許還可以這樣?
trace_file = (
"+trace_file=%s"
% (file if (file := args.trace_output_file) else f"{args.output_dir}/trace.fst")
if args.trace
else ""
)
Published at
2023-12-04 10:52:26Event JSON
{
"id": "4f7f5f7552c2982a1b388a7554914529fb5d2ac8dfdb3a7c2b58bd3a5cbb9301",
"pubkey": "977708d67b0efeac12f904582d55a84cb85016793a731646bf440f9d26497d57",
"created_at": 1701687146,
"kind": 1,
"tags": [
[
"p",
"71ea5c9d9ef4f01c1ecb1a116f7d15ffb26a241620bf28c856593523a5e8edcb",
"wss://relay.mostr.pub"
],
[
"e",
"32502f0f02b2e2da0f4c16004b9eaff9f4aacf4796de1f9b871f8e476b5f65ef",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://social.boiledscript.com/notes/9mucwisx5x",
"activitypub"
]
],
"content": "nostr:npub1w849e8v77ncpc8ktrggk7lg4l7ex5fqkyzlj3jzkty6j8f0gah9sstpmwq black 把這段改成這樣了:\n\ntrace_file = (\n f\"+trace_file={args.trace_output_file}\"\n if args.trace_output_file\n else f\"+trace_file={args.output_dir}/trace.fst\"\n if args.trace\n else \"\"\n)\n或許還可以這樣?\n\ntrace_file = (\n \"+trace_file=%s\"\n % (file if (file := args.trace_output_file) else f\"{args.output_dir}/trace.fst\")\n if args.trace\n else \"\"\n)",
"sig": "2b6c7f1c8e7b1f196f37d88d4ea279925b7d8e01985fa678fa92aa342d1db573f3900b0f12f91e91af339a6689ac799fcbf7a5fba86dbfec3f9fc709d30b3ed5"
}