开发者交流平台
开发者交流平台

通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。

bj
登录
  • 友情链接
站内
python-decorators

python-decorators

go

访问Python中装饰器参数的默认值。

英文: Accessing default value of decorator argument in Python 问题 Here's the translated code without th...
huangapple 2023年5月25日132评论python python-decorators
go

可以将函数参数传递给装饰器吗?

英文: Is it possible to pass a function argument into a decorator? 问题 Here is the translated code port...
huangapple 2023年5月21日128评论discord python
go

类属性在Python 3.11+中

英文: Class properties in Python 3.11+ 问题 In Python 3.9,我们获得了使用@classmethod和@property链式创建类属性的能力。 class...
huangapple 2023年5月15日160评论python python-3.x
go

如何在Python中在错误发生时重新启动装饰器

英文: How to restart decorator on error in python 问题 我有一个名为func()的装饰器,有时在运行时会引发AttributeError错误,但如果重新运...
huangapple 2023年5月10日131评论attributeerror python
go

For type checking, can I use decorators to check optional typed class attributes are defined to prevent None object has no attribute errors?

英文: For type checking, can I use decorators to check optional typed class attributes are defined to ...
huangapple 2023年4月19日143评论mypy python
go

添加 __getitem__ 访问器到 Python 类方法

英文: adding __getitem__ accessor to Python class method 问题 I'll provide the translated code and discu...
huangapple 2023年3月21日173评论python python-typing
go

如何检查是否从未等待过任何异步函数?

英文: How to check if any async function has never been awaited? 问题 以下是您要翻译的代码部分: def checkawait(test)...
huangapple 2023年2月24日138评论async-await python
go

嵌套装饰器在Python中定义模拟方法

英文: Nested decorators in Python defining simulation methods 问题 以下是你提供的代码的中文翻译: 让我们假设我们有三种模拟方法: ```py...
huangapple 2023年2月14日118评论python python-decorators
go

如何使用装饰器向模型添加字段?

英文: How to add a field to model with a decorator? 问题 我想为我的应用程序中的几乎每个模型都添加外键以允许不同的站点。为此,我认为使用装饰器会很好,因...
huangapple 2023年2月14日102评论django django-models
go

为什么我的上下文管理器在异常发生时没有退出

英文: Why does my context manager not exit on exception 问题 以下是您要翻译的部分: Original Implementation: 原始实现: ...
huangapple 2023年2月10日130评论python python-decorators
name
开发者交流平台
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
文章117266 留言 4 访客17267802

热门标签

node.js android javascript html flutter java reactjs pandas css c# spring-boot typescript go c++ arrays python json r sql spring

悟已往之不谏,知来者之可追!

今日
00%
已00小时
本周
00%
已过00天
本月
00%
已过00天
今年
00%
已是00月

Copyright ©  开发者交流平台 版权所有.

闽 ICP 备 2022019110 号 - 1
  • 开发者交流平台

    本页二维码