You can extend the Book type to create a BookSales type using the extension base keyword.
可以通过使用 extension base 关键字扩展 Book 类型以创建 BookSales 类型。
In the scenario, the domain defines a domain specialization entity for the apiname base element as well as the keyword ancestor element (which is the base element for apiname).
在该方案中,域为apiname基本元素和keyword祖先元素(它是apiname的基本元素)定义了域专门化实体。
Notice that now in a class definition, keyword arguments are allowed after the list of base classes—generally speaking, class Foo(*bases, **kwds): pass.
请注意,现在,在类定义中,关键字参数被允许出现在基类列表之后 — 通常来讲,即 class Foo(*bases, **kwds): pass。
应用推荐