资源简介
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-BDD100K大规模多样化驾驶视频数据
- Instant Pygame for Python Game Development How
- Biopython Tutorial
- Think Python 2nd
- 一个小小的表白程序(python)
- Python课堂笔记(高淇400集第一季)
- 二级考试python试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
评论
共有 条评论