腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
什么
是
"...“
在
python
def
中
表示
python
、
function
、
overriding
这可能
是
一个非常愚蠢的问题,但我不能理解
python
def
中
的三个点代表
什么
。我试图理解deque对象(来自collections模块)
中
in运算符的成本,所以我浏览了代码,找到了以下内容: ? 我认为它们意味着方法在被调用时将使用“上层”定义,但是如果我导航到被覆盖的方法,我将无法
在
Container类中找到任何抽象方法。所以我仍然不明白in运算符
在
deque对象上
是
如何工作的。
浏览 10
提问于2019-03-18
得票数 0
3
回答
def
行在
python
中
做
什么
?
python
倒数第二行在这里做
什么
?它似乎没有赋值变量,打印或任何东西,但我尝试了各种方式打破代码和行doublelist(somelist)似乎
是
必要的,但我不知道为
什么
。
def
doubleList(list): while i<len(list): i=i+1 someList
浏览 4
提问于2012-02-13
得票数 4
回答已采纳
1
回答
DRF表单呈现对象属性(名称)而不是对象
python
、
django
、
python-3.x
、
django-rest-framework
表单选择选项显示的
是
“调查对象”-我如何才能让它呈现测量名称呢?查找字段使用的
是
调查对象'name‘属性--我如何才能获得POST表单来也使用它?
浏览 3
提问于2016-01-19
得票数 1
回答已采纳
1
回答
什么
是
Java类
中
的
def
java
、
function
、
class
、
variables
、
rest-assured
目前,我
在
我的项目中使用RestAssured来实现API自动化。正如我们所知,这是一个Java项目。
def
Response put(URL url) { }
浏览 4
提问于2021-01-14
得票数 0
回答已采纳
1
回答
python
在
def
()
中
`*‘和`/’意味着
什么
?
python
我
在
* typing 源代码中找到了 , ,但我不明白它意味着
什么
.
def
TypedDict(typename, fields=None, /, *, total=True, **kwargs):
浏览 4
提问于2022-08-10
得票数 -2
2
回答
在
python
3
中
使用
def
和
def
python
、
python-3.x
我试图
在
python
3
中
使用
def
并返回,这将检查一个数字是否高于另一个数字,然后将状态返回为True或False。然而,我似乎无法做到这一点。当我运行它时,我会得到一个nameError。代码如下: if data <= on_off_status: elif: "))我希望能够
浏览 6
提问于2015-08-15
得票数 0
回答已采纳
2
回答
如何在列表
中
创建对象的字符串
表示
?
python
、
python-3.x
、
class
、
multiple-instances
我正在尝试用
Python
创建一个国王杯(饮酒游戏,涉及扑克牌)的游戏。现在,当我打印甲板和参与者列表时,控制台似乎打印出了内存地址。我会感谢任何帮助,指点,提示,建议。请谢谢你。import random
def
__init__(self, name, gender): self.cards = [] self.cards
浏览 1
提问于2018-08-23
得票数 0
回答已采纳
2
回答
列表
python
的排列
python
、
permutation
、
itertools
我需要定义一个函数apply(L,P),其中L
是
一个列表,P
是
一个排列,它应该返回列表L o P。假设len(L) = len(P)
def
apply(L, P): return perm 输入的一个示例
是
apply(['ah', 'boo', 'cc', 'du', 'eh'], [1, 4, 3, 2, 0]),但它的唯一输出<
浏览 2
提问于2013-11-18
得票数 0
1
回答
Python
TypeError:胁迫到Unicode:需要字符串或缓冲区,长期找到
python
、
django
blank=True, null=True)
def
Traceback (most recent call last): File "/home/eisti/.local/lib/
python
2.7__name__, dat
浏览 3
提问于2017-11-30
得票数 0
回答已采纳
2
回答
当函数返回特定类型的对象或无对象时,应指定哪种类型的提示?
python-3.x
、
return-type
、
type-hinting
自从我
在
Python
中发现了类型提示后,我就开始使用它们,因为我认为它们对代码的读者很有用。我期待着这些类型提示
在
未来最终成为类型静态检查器,因为它将使代码更加可靠,这对于一个严肃的项目来说非常重要。目前,我正在使用如下内容
浏览 0
提问于2016-02-21
得票数 4
3
回答
为
什么
=
在
Scala
中
的
def
中
是
可选的
scala
为
什么
?这种行为有
什么
好处吗?
def
1 sleep((math.random*1000).toLong); } sleep((math.random*1000).toLong); }
浏览 6
提问于2017-09-20
得票数 1
回答已采纳
1
回答
复数的‘j’后缀
是
如何工作的?我能做我自己的后缀吗?
python
、
python-3.x
、
complex-numbers
我知道
什么
是
复数,它们在数学上
是
如何工作的,但是
是
如何对进行处理的--仅仅是在数字后面加上一个就可以了Traceback (most recent call last): File "
浏览 1
提问于2018-07-07
得票数 2
回答已采纳
1
回答
浮动
表示
的差异
python
、
floating-point
、
floating-accuracy
在
中
,用户提供了此简短函数,用于返回浮点值的二进制
表示
形式:import sys """ Convert a floatinto a binary string. """ if sys.version_info >= (3,): #
Python
3?当我使用值7/3-4/3 (
在
Python
3
浏览 31
提问于2018-06-09
得票数 1
回答已采纳
2
回答
自定义
Python
数据结构
python
我有一个类,它围绕着来自collections的
python
deque。当我去创建一个deque x=deque()时,我会创建一个空的deque对象。因此,如果我填充它:x.append(0),只需
在
控制台上输入x,就会得到:Out[78]: deque([0])
def
__init__(self):
浏览 4
提问于2014-09-08
得票数 0
回答已采纳
1
回答
什么
是
“覆盖
def
*”
在
Scala灵活的模式特征
中
scala
、
slick
._
def
apple = column[String]("apple") // what is this line of code used for?override
def
* = (apple,banana
浏览 2
提问于2021-11-04
得票数 1
回答已采纳
1
回答
在
.py
中
创建
python
def
python
、
python-3.x
我正在尝试创建一个外部的py文件
中
的
def
文件,例如。calls.py whale = animalia.whale("Chordata", print(calls.printbluewhale())
浏览 12
提问于2016-09-19
得票数 0
2
回答
python
3从父方法调用子属性
python-3.x
、
inheritance
、
methods
、
attributes
、
parent
无法
在
父方法
中
调用子属性,下面
是
测试:
def
getPath(self): self.__name = name instance = B('t
浏览 0
提问于2017-10-26
得票数 2
回答已采纳
3
回答
函数
中
的globals()作用域
python
、
global-variables
、
global
我有一个关于
python
中
globals()的问题b=9 'kkk' print globals()由于b
是
全局的,所以我希望我可以在任何地方修改它,所以我将代码修改为
def
a1(): b=100print globals() 我的globals()仍然
表示
b为100。为
什么
函数
中
的b
浏览 10
提问于2017-09-15
得票数 0
回答已采纳
1
回答
在
python
中
def
语句中'->‘的用法是
什么
?
python
、
python-3.x
看看给出的答案
def
md5_checksum_table(dir_name: str, suffix: str) -> {bytes: [str]}:有人能向我解释一下这是
什么
吗?
浏览 3
提问于2016-10-06
得票数 2
回答已采纳
1
回答
将self.var (实例属性)作为默认方法参数传递
python
、
class
在
函数num1 = self.var1
中
分配fiz时,
Python
表示
未解析引用。为
什么
会这样呢?class Foo: self.var1 = "xyz"
def
fiz(self, num1=self.var1):
浏览 1
提问于2016-06-30
得票数 6
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券