Comments (2)
In the meantime, the garbage collector handles these just fine:
~> ipython
Python 2.7.8 (default, Aug 28 2014, 15:56:03)
Type "copyright", "credits" or "license" for more information.
IPython 2.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import gc
In [2]: gc.set_debug(gc.DEBUG_COLLECTABLE | gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_OBJECTS)
In [3]: gc.collect()
...
Out[3]: 211
In [4]: from bidict import bidict
In [5]: b = bidict()
In [6]: b = None
In [7]: gc.collect()
gc: collectable <bidict 0x10cfb57d0>
gc: collectable <dict 0x10cfe3398>
gc: collectable <bidict 0x10cfb5710>
gc: collectable <dict 0x10cfd8280>
Out[7]: 4
This just demonstrated that once a bidict's refcount drops to 0, the garbage collector is able to free it (b
), the inverse bidict it refers to and that refers to it (b._inv
), and their two backing dicts (b._fwd
and b._bwd
).
Punting for now.
from bidict.
document current behavior: 54bece2
from bidict.
Related Issues (20)
- global name 'BidirectionalMapping' is not defined HOT 21
- github git tags out of sync since 0.18.4 HOT 3
- Missing __all__ in bidict/__init__.py leads to implicit reexport error with mypy in strict mode. HOT 9
- logo HOT 5
- Dependency Dashboard
- Type hints for Bidict type HOT 2
- Try slipcover HOT 1
- Maybe use nix for devcontainer and GHA “tests” workflow
- Why it returns None when I use bidict?
- Will you add a persistence method? HOT 1
- Improve OpenSSF Scorecard HOT 6
- Swap syntax does not work HOT 4
- Automate upgrading dev dependencies HOT 1
- Type alias definition for `MISSING` results in type violations HOT 1
- test fails with python3.12 HOT 3
- Remove dead batteries
- 0.22.1: temp directory in source tree trashes build HOT 6
- 0.22.1: sphinx warnings `reference target not found` HOT 6
- mypy type inference change in 0.23.0 HOT 12
- Recommended performant alt for `namedbidict` HOT 2
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 bidict.