Opened 9 years ago
Closed 9 years ago
#5383 enhancement closed fixed (fixed)
Provide a library for simple valued named constants
Reported by: | Jean-Paul Calderone | Owned by: | Jean-Paul Calderone |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Keywords: | |
Cc: | Branch: |
branches/valued-constants-5383
branch-diff, diff-cov, branch-cov, buildbot |
|
Author: | exarkun |
Description (last modified by )
#4671 proposed adding a lot of new symbolic constant features to a helper somewhere in Twisted. This is for the kind of symbolic constant that has an associated value (perhaps unique? perhaps not? perhaps those are both valueable use cases), assigned either manually or automatically from a monotonically increasing sequences of integers.
This would be useful in the HTTP implementation, in the IRC implementation, in the telnet implementation, and probably in lots more places.
Change History (7)
comment:1 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 9 years ago by
Author: | → exarkun |
---|---|
Branch: | → branches/valued-constants-5383 |
comment:3 Changed 9 years ago by
Keywords: | review added |
---|---|
Owner: | Jean-Paul Calderone deleted |
comment:4 Changed 9 years ago by
Owner: | set to Itamar Turner-Trauring |
---|---|
Status: | new → assigned |
comment:5 Changed 9 years ago by
Keywords: | review removed |
---|---|
Owner: | changed from Itamar Turner-Trauring to Jean-Paul Calderone |
Status: | assigned → new |
_ConstantsContainer
still has references toNamedConstants
andNames
. Likewise_EnumerantsInitializer
.- I'd move
NamedConstant
to be next toNames
, rather than off elsewhere in the code. lookupByValue
should document, and test, that if there are multiple constants with same value, the first one will be returned.
Once you fix those, feel free to merge.
comment:6 Changed 9 years ago by
comment:7 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
(In [33282]) Branching to 'valued-constants-5383'