Comments (2)
Above (#77 (comment)), the conclusion was to, among other changes, rename the constants dd.cudd.GB
and dd.cudd_zdd.GB
to dd.cudd.GiB
and dd.cudd_zdd.GiB
, respectively (and to remove the unused constant dd.sylvan.GB
).
Previously, in each of these two modules, the constant GB
was used at two places, and only internally to dd
(the constant could have been hidden as _GB
). However, the changes described above would result in the constant GiB
being used at only one place (and still only internally to dd
): just to define another constant, on the line after the line that would define GiB
. So the constant GiB
would be redundant ("Simple is better than complex." PEP 20).
Therefore, the constant GB
will be removed from these modules, and no replacement constant (like GiB
was intended to be) added. Instead, the number 2**30
will replace the use of GB
on the line this occurs. A comment will mention "GiB" and the relevant standard, in order to emphasize that the chosen number (2**30
) is a binary multiple. This removes entirely from dd
the presence of any convention on naming multiples: the numbers themselves are used directly.
Also, several of the concerns and alternatives discussed regarding the renaming are not relevant or applicable after this decision, so it becomes obvious what the new design will be.
Aside: A module variable that is intended to be used as a constant is usually named with all uppercase letters and underscores, according to PEP 8. So the choice of identifier GiB
above would not have been entirely incompatible with PEP 8, though it is not recommended (nevertheless, this naming case concerns a standardized unit name, so preserving the letter case seems the best choice). In any case, the decision to remove the constant as unnecessary also avoids this naming conundrum.
from dd.
Addressed in commits cc8a609, e248d95, a1dbbd6, and 4f488a3.
from dd.
Related Issues (20)
- Multi-state reliability with MDDs: problem statement HOT 9
- Example: Reachability Analysis HOT 2
- Understanding of BDD generated diagram HOT 2
- Quantifying multi-state reliability with MDDs HOT 1
- Question: Referencing children node in an MDD HOT 3
- Question: Recursive function for MDDs HOT 3
- install cudd using --fetch or using existing cudd build directory not working HOT 1
- Support for pure-Python ZDD implementation. HOT 2
- Question: MDD Method that returns the level of a node? HOT 1
- "bdd.let" does not work with substitutions with overlapping variables HOT 1
- Maximum expression length for autoref.BDD.add_expr() HOT 2
- using dd package properly HOT 1
- `cudd.to_expr` does not produce the correct result after reordering HOT 4
- Python 3.10 HOT 2
- AssertionError when using let HOT 2
- Question: Conversion function returning empty DiGraph
- REL: specify Python version using `Requires-Python`, not Trove classifiers for second numeric component HOT 1
- SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead HOT 5
- --install-option does not work anymore in requirements.txt HOT 6
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 dd.