Comments (2)
This is a potential use-case for potential Proxy
type, which does not exist right now.
The core idea can be demonstrated as:
class MyWrapper[T]:
def __init__(self, obj: T) -> None:
self._obj = obj
def __getattr__(self, key: str) -> Proxy[T]:
return getattr(self._obj, key)
But, we need to create a proper discussion about this feature :)
from cpython.
Right now this can be special-cased using mypy plugin, though!
from cpython.
Related Issues (20)
- configparser.RawConfigParser._read is unmanageably complex HOT 1
- Speed up `os.path` HOT 4
- Handle `/:/` for `ntpath.isabs` HOT 15
- Callable.collections HOT 2
- Download link for Python 3.5.9 is broken and returns a 404 HOT 8
- Confusing wording in `os.path.lexists` docs HOT 6
- Improve `os` HOT 1
- Consider adding `doctest.skip_if` decorator HOT 4
- Implement deferred reference counting in free-threaded builds
- New warning: `unused variable βstβ [-Wunused-variable]` HOT 1
- forkserver.set_forkserver_preload() fails
- Confusing asyncio.create_task documentation about task lifetime HOT 1
- Fix error message for `ntpath.commonpath` HOT 2
- Handle `/:` for `ntpath.normpath` HOT 1
- sys.settrace set some events without callbacks
- `test_compileall.EncodingTest` is broken HOT 2
- Allow JSONEncoder to handle passing unsupported dict keys through `.default()` before throwing TypeError
- Reduce syscalls for `posixpath.ismount` HOT 5
- Isolate the _datetime extension module HOT 2
- Handle not executable directories for `os.listdir` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpython.