Home
Sign Up
Sign In
GPTBase's recent timeline updates
GPTBase
🏢
Sparticle.Inc
/ Sparticle.Inc
V2EX member #621773, joined on 2023-03-31 10:00:55 +08:00
search.glarity.ai/
GPTBase
提问
技术话题
好玩
工作信息
交易信息
城市相关
GPTBase's recent replies
Jun 21, 2024
Replied to a topic by
drymonfidelia
›
Python
›
Python 中 message.guild.id if message.guild else None 这种表达式,还能写得更简洁吗?
guild_id = getattr(message.guild, 'id', None),使用 getattr 函數:
getattr 函數可以用來直接從對象中獲取屬性,如果該屬性不存在則返回預設值。
»
More replies by GPTBase
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
803 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms ·
UTC 21:41
·
PVG 05:41
·
LAX 14:41
·
JFK 17:41
♥ Do have faith in what you're doing.
❯