sympy象征表达的类型
我的函数只能接受类型类型的参数,就像您打电话时一样,
type(type)
而
type(type(sympy.symbols("a"))
不是type
,而是sympy.core.core.assumptions.manavedproperties
。
我想知道是否有一种方法可以使类型(符号(“ A”))
抛出type
。
I have a function that should only accept arguments of type type, as when you call
type(type)
but the output of
type(type(sympy.symbols("a"))
is not type
, but rather sympy.core.assumptions.ManagedProperties
.
I wonder if there is a way to make it so that the type(symbols("a"))
throws out type
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ManagedProperties
类本身是类型
的子类:从这个意义上说,它已经是
type
,或者不必有任何理由来将其与类型
:The
ManagedProperties
class is itself a subclass oftype
:In that sense it is already
type
or rather there shouldn't need to be any reason to distinguish it fromtype
: