资源简介
notepad++的pythonscript插件
代码片段和文件信息
# 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:
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 242139 2011-02-27 03:00 plugins\doc\Pythonsc
文件 914432 2011-02-27 03:00 plugins\Pythonsc
文件 7145 2010-12-12 00:07 plugins\Pythonsc
文件 33246 2009-10-15 01:30 plugins\Pythonsc
文件 60 2008-10-15 19:49 plugins\Pythonsc
文件 2620 2002-06-01 22:18 plugins\Pythonsc
文件 87304 2010-12-12 00:07 plugins\Pythonsc
文件 11840 2009-01-13 19:52 plugins\Pythonsc
文件 11402 2008-09-09 08:49 plugins\Pythonsc
文件 20612 2010-12-12 00:07 plugins\Pythonsc
文件 1705 2006-11-17 00:50 plugins\Pythonsc
文件 7597 2008-05-07 07:23 plugins\Pythonsc
文件 11357 2010-12-12 00:07 plugins\Pythonsc
文件 22344 2010-02-22 18:55 plugins\Pythonsc
文件 5744 2008-05-10 10:27 plugins\Pythonsc
文件 20967 2010-12-12 00:07 plugins\Pythonsc
文件 14476 2010-05-06 03:09 plugins\Pythonsc
文件 2595 2009-04-01 01:47 plugins\Pythonsc
文件 2730 2008-07-23 19:38 plugins\Pythonsc
文件 11344 2010-03-22 22:22 plugins\Pythonsc
文件 5308 2006-06-11 16:35 plugins\Pythonsc
文件 12204 2010-03-22 22:22 plugins\Pythonsc
文件 30879 2010-11-07 19:12 plugins\Pythonsc
文件 2964 2009-10-15 02:01 plugins\Pythonsc
文件 15988 2010-04-04 00:06 plugins\Pythonsc
文件 212480 2011-02-06 23:58 plugins\Pythonsc
文件 23107 2010-12-12 00:07 plugins\Pythonsc
文件 34478 2010-12-12 00:07 plugins\Pythonsc
文件 12986 2010-12-12 00:07 plugins\Pythonsc
文件 12073 2010-04-02 02:17 plugins\Pythonsc
文件 5372 2006-02-19 05:10 plugins\Pythonsc
............此处省略626个文件信息
- 上一篇:pycharm pymssql python3.6
- 下一篇:链路预测 python
相关资源
- 链路预测 python
- pycharm pymssql python3.6
- matplotlib win32 python2.7画图包
- django简易学生成绩管理
- python+keras+deeplearning
- 基于python的小车走黑线
- python cookbook(第3版)高清中文完整
- 生成Python代码控制流图
- ml-agents-master
- 从视频中分离前景目标的Python & Matl
- 百度图像自动识别程序
- xlrd-1.2.0.tar
- python3.7离线帮助文档英文原版
- 爬取优酷电影代码
- Python开发五子棋小游戏
- 《Python Cookbook》第三版中文完整版
- 黑马2017Python课程配套笔记
- Python空间分析教程
- numpy-1.12.1rc1-cp27-none-win_amd64.whl
- 《Python 3.6 入门指南》中文版
- Python核心编程第二版完整版_高清中文
- Python核心编程第二版中文.pdf
- Tkinter教程第二版.pdf
- python机器学习-音乐分类器实现
- 免费Python性能分析与优化.pdf
- SNIC超像素python代码
- wxPython2.8-win32-unicode-2.8.12.1-py27.exe
- python数据可视化编程实战 pdf 中文完整
- eric4-4.5.23
- python-3.7.3中文文档 chm版
评论
共有 条评论