资源简介
Dev-Cpp.zip
代码片段和文件信息
# Copyright 2007 Google Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
“““Abstract base Classes (ABCs) according to PEP 3119.“““
import types
from _weakrefset import WeakSet
# Instance of old-style class
class _C: pass
_InstanceType = type(_C())
def abstractmethod(funcobj):
“““A decorator indicating abstract methods.
Requires that the metaclass is ABCmeta or derived from it. A
class that has a metaclass derived from ABCmeta cannot be
instantiated unless all of its abstract methods are overridden.
The abstract methods can be called using any of the normal
‘super‘ call mechanisms.
Usage:
class C:
__metaclass__ = ABCmeta
@abstractmethod
def my_abstract_method(self ...):
...
“““
funcobj.__isabstractmethod__ = True
return funcobj
class abstractproperty(property):
“““A decorator indicating abstract properties.
Requires that the metaclass is ABCmeta or derived from it. A
class that has a metaclass derived from ABCmeta cannot be
instantiated unless all of its abstract properties are overridden.
The abstract properties can be called using any of the normal
‘super‘ call mechanisms.
Usage:
class C:
__metaclass__ = ABCmeta
@abstractproperty
def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write
abstract property using the ‘long‘ form of property declaration:
class C:
__metaclass__ = ABCmeta
def getx(self): ...
def setx(self value): ...
x = abstractproperty(getx setx)
“““
__isabstractmethod__ = True
class ABCmeta(type):
“““metaclass for defining Abstract base Classes (ABCs).
Use this metaclass to create an ABC. An ABC can be subclassed
directly and then acts as a mix-in class. You can also register
unrelated concrete classes (even built-in classes) and unrelated
ABCs as ‘virtual subclasses‘ -- these and their descendants will
be considered subclasses of the registering ABC by the built-in
issubclass() function but the registering ABC won‘t show up in
their MRO (Method Resolution Order) nor will method
implementations defined by the registering ABC be callable (not
even via super()).
“““
# A global counter that is incremented each time a class is
# registered as a virtual subclass of anything. It forces the
# negative cache to be cleared before its next use.
_abc_invalidation_counter = 0
def __new__(mcls name bases namespace):
cls = super(ABCmeta mcls).__new__(mcls name bases namespace)
# Compute set of abstract method names
abstracts = set(name
for name value in namespace.items()
if getattr(value “__isabstractmethod__“ False))
for base in bases:
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-21 12:04 Dev-Cpp\
目录 0 2018-04-21 12:03 Dev-Cpp\Ast
文件 432128 2015-03-26 02:17 Dev-Cpp\Ast
目录 0 2018-04-21 12:03 Dev-Cpp\Ast
文件 72531 2015-03-26 02:17 Dev-Cpp\Ast
文件 11365 2015-03-26 02:17 Dev-Cpp\Ast
文件 18758 2015-03-26 02:17 Dev-Cpp\Ast
文件 11801 2015-03-26 02:17 Dev-Cpp\Ast
文件 8381 2015-03-26 02:17 Dev-Cpp\Ast
文件 27422 2015-03-26 02:17 Dev-Cpp\Ast
文件 19191 2015-03-26 02:17 Dev-Cpp\Ast
文件 6579 2015-03-26 02:17 Dev-Cpp\Ast
文件 1854 2015-03-26 02:17 Dev-Cpp\Ast
文件 5928 2015-03-26 02:17 Dev-Cpp\Ast
文件 5541 2015-03-26 02:17 Dev-Cpp\Ast
文件 18581 2015-03-26 02:17 Dev-Cpp\COPYING.txt
文件 171008 2015-03-22 20:08 Dev-Cpp\ConsolePauser.exe
目录 0 2018-04-21 12:03 Dev-Cpp\Help\
目录 0 2018-04-21 12:03 Dev-Cpp\Help\FAQ\
文件 2828 2015-03-26 02:17 Dev-Cpp\Help\FAQ\Compiler.htm
文件 399 2015-03-26 02:17 Dev-Cpp\Help\FAQ\Editor.htm
文件 1436 2015-03-26 02:17 Dev-Cpp\Help\FAQ\Environment.htm
文件 1521 2015-03-26 02:17 Dev-Cpp\Help\FAQ\Versions.htm
目录 0 2018-04-21 12:03 Dev-Cpp\Help\Interface\
目录 0 2018-04-21 12:03 Dev-Cpp\Help\Interface\Dialog Windows\
目录 0 2018-04-21 12:03 Dev-Cpp\Help\Interface\Dialog Windows\Compiler Options\
文件 1624 2015-03-26 02:17 Dev-Cpp\Help\Interface\Dialog Windows\Compiler Options\Directories.htm
文件 845 2015-03-26 02:17 Dev-Cpp\Help\Interface\Dialog Windows\Compiler Options\General.htm
文件 1041 2015-03-26 02:17 Dev-Cpp\Help\Interface\Dialog Windows\Compiler Options\Makefile.htm
文件 1422 2015-03-26 02:17 Dev-Cpp\Help\Interface\Dialog Windows\Compiler Options\Programs.htm
文件 2810 2015-03-26 02:17 Dev-Cpp\Help\Interface\Dialog Windows\Compiler Options\Settings.htm
............此处省略6062个文件信息
- 上一篇:imindmap思维导图模板100+
- 下一篇:ANSYS结构动力分析与应用王新敏
相关资源
- 力软敏捷开发框架7.0专业版.7z
- Wireshark-2.6.1.rar
- 人人商城最新版全套公司稳定运营版
- 大学生超星尔雅自动刷课神器.rar
- 2019布谷直-源码完全开源.rar
- 夏宇闻-verilogHDL入门5部所有资料.zip
- opencv学习资源.zip
- 08CMS房产网.rar
- 中国自然灾害系统地图集.part3.rar
- CPrimer第五版中文版.zip
- slam高博随书代码slambook-master.rar
- srcnn.rar
- 无人驾驶.rar
- 电子技术基础模拟部分第六版学习辅
- IntroductiontoLinearAlgebra5ed.part1.rar
- MachineLearningforHackers中英文.rar
- EnterpriseArchitect.rar
- 艾伦·图灵传——如谜的解谜者.rar
- HJ独立版3.1.26.zip
- HJ独立版3.1.18.zip
- xiaomi.rar
- 中文版PhotoshopCC完全自学教程[扫描版
- TransCAD免安装版.zip
- 人才招聘网站.zip
- 计算机毕业课程设计源码打包.rar
- 数字信号处理教程习题分析与解答第
- 亿图-EdrawMax.rar
- 聚合小说漫画动漫听书分销系统源码
- 深度探索C对象模型2012版.pdf
- IntroductiontoLinearAlgebra5thGilbertStrang.pd
评论
共有 条评论