Chris Angelico writes:
On Thu, May 9, 2013 at 9:30 PM, Jussi Piitulainen wrote:
8 Dihedral writes:
This is just the handy style for a non-critical loop.
In a critical loop, the number of the total operation counts
does matter in the execution speed.
Do you use speed often?
On Sun, May 12, 2013 at 1:17 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Sat, 11 May 2013 21:45:12 -0700, rusi wrote:
I have on occasion expressed that newcomers to this list should be
treated with more gentleness than others. And since my own joking may be
taken amiss,
Not sure if this is an oversight or something deliberate... could be either.
From http://docs.python.org/3.0/library/http.server.html there's no
link to the current docs, even though from
http://docs.python.org/3/library/http.server.html it's possible to
switch to 3.2 and then back to 3.3 (or to
Thank you very much for your answers.
I'm afraid that, at this stage, I must prevent myself from knowing too
much about the subject. My idea here is trying to fill the gaps, mostly,
using intuition. What I do here is to try to understand. That's different
from just knowing. Knowledge growth must
On Sun, 12 May 2013 16:17:02 +0200, Citizen Kant wrote:
Any clue about this would be highly appreciated.
If you are interested in the intersection of programming and philosophy,
I strongly recommend that you read Gödel, Escher, Bach: An Eternal
Golden Braid by Douglas R. Hofstadter.
--
On Sun, 12 May 2013 04:15:30 -0400, Devin Jeanpierre wrote:
On Sun, May 12, 2013 at 1:17 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Sat, 11 May 2013 21:45:12 -0700, rusi wrote:
I have on occasion expressed that newcomers to this list should be
treated with more
On Mon, May 13, 2013 at 12:17 AM, Citizen Kant citizenk...@gmail.com wrote:
Maybe It'd be good if I explain myself a bit more. What I'm trying here is
to grasp Python from the game's abstraction point of view, as if it were,
for example, chess.
Maybe you're going for something a little too
(slightly offtopic, sorry.)
On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring j...@toerring.de wrote:
PS: If I may ask you a favor: consider refraining from using Google's
completely broken interface to newsgroups - your post consists
of nearly 200 lines of text containing all I
On May 12, 7:17 pm, Citizen Kant citizenk...@gmail.com wrote:
Maybe It'd be good if I explain myself a bit more. What I'm trying here is
to grasp Python from the game's abstraction point of view, as if it were,
for example, chess. That's why I need a real_player to point me to: (so to
speak, I
On Mon, May 13, 2013 at 1:59 AM, Chris “Kwpolska” Warrick
kwpol...@gmail.com wrote:
On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring j...@toerring.de
wrote:
PS: If I may ask you a favor: consider refraining from using Google's
completely broken interface to newsgroups - your post
On Fri, 10 May 2013, Robert Kern wrote:
On 2013-05-10 12:00, Steven D'Aprano wrote:
But either way, that's fine. You've found an object where it does make
sense to have an explicit make it go method: first one entity has
permission to construct the object, but not to open the underlying file.
On Fri, 10 May 2013, Gregory Ewing wrote:
Wayne Werner wrote:
You don't ever want a class that has functions that need to be called in a
certain order to *not* crash.
That seems like an overly broad statement. What
do you think the following should do?
f = open(myfile.dat)
f.close()
On 5/8/2013 10:39 PM, Mark Janssen wrote:
...The field needs re-invented and re-centered.[...]
For anyone who want to be involved. See the wikiwikiweb -- a tool
that every programmer should know and use -- and these pages:
ComputerScienceVersionTwo and ObjectOrientedRefactored.
I've never
On Sunday, May 12, 2013 7:51:28 AM UTC-7, Chris Angelico wrote:
On Mon, May 13, 2013 at 12:17 AM, Citizen Kant citizenk...@gmail.com wrote:
Maybe It'd be good if I explain myself a bit more. What I'm trying here is
to grasp Python from the game's abstraction point of view, as if it were,
On 12/05/13 03:02, duncan smith wrote:
On 12/05/13 02:29, Dan Stromberg wrote:
On Sat, May 11, 2013 at 4:24 PM, Dan Stromberg drsali...@gmail.com
mailto:drsali...@gmail.com wrote:
[snip]
What should BinaryTree.find() do if it finds a data.node that is None?
A call to find(data) should
On 5/12/2013 10:12 AM, Chris Angelico wrote:
Not sure if this is an oversight or something deliberate... could be either.
From http://docs.python.org/3.0/library/http.server.html there's no
link to the current docs, even though from
http://docs.python.org/3/library/http.server.html it's
im new to python and im in the middle of making a RPS game for a college
unit.
i have used PyQt to create the GUI and i have received help regarding
adding the code to the buttons.
but its missing something as the error
'Traceback (most recent call last): File C:\Users\Me\Desktop\testy.py,
line
On Saturday, 11 May 2013 23:20:13 UTC+1, Jens Thoms Toerring wrote:
Alex Norton ayjayn1...@gmail.com wrote:
On Wednesday, 1 May 2013 13:15:28 UTC+1, Jens Thoms Toerring wrote:
Of course, it might be nicer to have a result label some-
where in the graphical interface which you set
On Sun, May 12, 2013 at 12:33 PM, Alex Norton ayjayn1...@gmail.com wrote:
im new to python and im in the middle of making a RPS game for a college
unit.
i have used PyQt to create the GUI and i have received help regarding adding
the code to the buttons.
but its missing something as the
On 5/12/2013 1:14 PM, Wayne Werner wrote:
On Fri, 10 May 2013, Gregory Ewing wrote:
Wayne Werner wrote:
You don't ever want a class that has functions that need to be called
in a certain order to *not* crash.
That seems like an overly broad statement. What
do you think the following should
On 5/12/2013 12:48 PM, Wayne Werner wrote:
I'll share the anti-pattern that I've seen many times (not actually in
Python)
class CoolPresenter:
def __init__(self):
self.view = None
self.some_property = None
self.other_property = None
On 5/12/2013 1:18 PM, Ned Batchelder wrote:
On 5/8/2013 10:39 PM, Mark Janssen wrote:
...The field needs re-invented and re-centered.[...]
For anyone who want to be involved. See the wikiwikiweb -- a tool
that every programmer should know and use -- and these pages:
ComputerScienceVersionTwo
On Mon, May 13, 2013 at 4:13 AM, llanitedave llanited...@veawb.coop wrote:
On Sunday, May 12, 2013 7:51:28 AM UTC-7, Chris Angelico wrote:
On Mon, May 13, 2013 at 12:17 AM, Citizen Kant citizenk...@gmail.com wrote:
Maybe It'd be good if I explain myself a bit more. What I'm trying here is
On Mon, May 13, 2013 at 5:32 AM, Terry Jan Reedy tjre...@udel.edu wrote:
On 5/12/2013 10:12 AM, Chris Angelico wrote:
Was this intentional, along the lines of not touching the old and
unsupported docs?
Cross referencing was added while 3.2 docs were still subject to revision.
x.y docs are
Chris “Kwpolska” Warrick kwpol...@gmail.com wrote:
(slightly offtopic, sorry.)
On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring j...@toerring.de
wrote:
PS: If I may ask you a favor: consider refraining from using Google's
completely broken interface to newsgroups - your post
On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring j...@toerring.de wrote:
Chris “Kwpolska” Warrick kwpol...@gmail.com wrote:
Gmail automatically hides long quotes. This is helpful in situations
like this one. More mail software should implement that
functionality. Seriously: once you go
Chris Angelico ros...@gmail.com wrote:
On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring j...@toerring.de wrote:
Chris “Kwpolska” Warrick kwpol...@gmail.com wrote:
Gmail automatically hides long quotes. This is helpful in situations
like this one. More mail software should implement
On 05/12/2013 03:33 PM, Alex Norton wrote:
im new to python and im in the middle of making a RPS game for a college
unit.
i have used PyQt to create the GUI and i have received help regarding
adding the code to the buttons.
I'm not at all familiar with PyQT, but I have used other GUIs, and
On Mon, May 13, 2013 at 8:58 AM, Jens Thoms Toerring j...@toerring.de wrote:
Chris Angelico ros...@gmail.com wrote:
On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring j...@toerring.de
wrote:
Chris “Kwpolska” Warrick kwpol...@gmail.com wrote:
Gmail automatically hides long quotes. This
Wayne Werner wrote:
On Fri, 10 May 2013, Gregory Ewing wrote:
f = open(myfile.dat)
f.close()
data = f.read()
To clarify - you don't want a class that has functions that need to be
called in a certain order with *valid input* in order to not crash.
Exactly what does happen - a
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
class
On 5/12/2013 7:23 PM, Mr. Joe wrote:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
# -*- coding: utf-8 -*-
from __future__ import
Am 13.05.2013 01:23, schrieb Mr. Joe:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
Python 2.7 doesn't use the negation of __eq__ when your
On Sun, May 12, 2013 at 5:23 PM, Mr. Joe titani...@gmail.com wrote:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
The != operator is
On 13/05/2013 00:40, Ian Kelly wrote:
On Sun, May 12, 2013 at 5:23 PM, Mr. Joe titani...@gmail.com wrote:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the
On Mon, May 13, 2013 at 9:47 AM, Dennis Lee Bieber
wlfr...@ix.netcom.com wrote:
On Mon, 13 May 2013 08:18:05 +1000, Chris Angelico ros...@gmail.com
declaimed the following in gmane.comp.python.general:
No, Chris (not me, the other Chris... *an*other Chris okay, one of
the chorus of
On May 13, 12:30 am, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
If you are interested in the intersection of programming and philosophy,
I strongly recommend that you read Gödel, Escher, Bach: An Eternal
Golden Braid by Douglas R. Hofstadter.
+1
--
Nick Coghlan added the comment:
Guido has promised an explanation for why he wants to keep the frame hack once
he is back at work next week. To help him target that reply appropriately for
my concrete objections to retaining it, I'd like to explain a bit more about
why I think it's
Nick Coghlan added the comment:
I don't think that would be wise - there's currently other logic in _get_mixins
that subclasses would then have to duplicate.
I was thinking more of an allow_subclass() API that subtypes could override to
always return True. EnumMeta would then just factor the
New submission from Nick Coghlan:
Creating this as a separate issue so as not to delay incorporation of the
accepted PEP.
One legitimate criticism of the accepted PEP 435 is that the combination of
requiring explicit assignment of values *and* allowing aliasing by default is
that aliases may
Changes by Nick Coghlan ncogh...@gmail.com:
--
dependencies: +Code, test, and doc review for PEP-0435 Enum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17959
___
Nick Coghlan added the comment:
I also created issue 17959 to track a legitimate concern with the current
aliasing design, without impacting incorporation of the accepted PEP.
--
___
Python tracker rep...@bugs.python.org
Alex Gaynor added the comment:
This would preclude code like:
class Shape(Enum):
rectangle = shape = 2
which seems (to me) to be the most reasonable way to express aliasing.
--
nosy: +alex
___
Python tracker rep...@bugs.python.org
Yogesh Chaudhari added the comment:
@Terry: Thanks for the info. I seem to have the elusive * after my username
now. I am not sure how this works, but can you review/test/apply the patch now?
--
___
Python tracker rep...@bugs.python.org
Yogesh Chaudhari added the comment:
I guess that was simple enough. I am new to this issue tracker for Cpython. How
will the patch review/commit proceed?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17940
New submission from Nick Coghlan:
As proposed at [1], I would like to tighten up the definition of locals so that
defining enum members programmatically is officially supported behaviour.
I'll come up with a patch soonish.
[1] http://mail.python.org/pipermail/python-dev/2013-May/125917.html
Ezio Melotti added the comment:
See also #17546 and #7083.
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17960
___
___
Nick Coghlan added the comment:
That's a terrible way to express aliasing, because it's really unclear that
rectangle is the canonical name.
By contrast:
class Shape(Enum):
rectangle = 2
oblong = rectangle
leaves no doubt as to which is canonical and which is the alias. You never
Changes by Antonio Pérez ape...@skarcha.com:
--
nosy: +skarcha
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17606
___
___
Python-bugs-list
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17960
___
___
Python-bugs-list
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17934
___
___
Python-bugs-list
Alexandre Vassalotti added the comment:
Stefan, I took a quick look at your patch. There is a couple things that stands
out.
First, I think the implementation of BINGLOBAL and BINGLOBAL_BIG should be
moved to another patch. Adding a binary version opcode for GLOBAL is a separate
feature and
Georg Brandl added the comment:
Cherry-picked to 3.2 branch as c31ff361cde3.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17666
___
Georg Brandl added the comment:
Thanks, applied to 3.2 branch.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17843
___
Georg Brandl added the comment:
Cherry-picked to 3.2 branch.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17857
___
___
Roundup Robot added the comment:
New changeset 5f62c848f713 by Benjamin Peterson in branch '3.3':
prevent IDLE from trying to close when sys.stdin is reassigned (#17838)
http://hg.python.org/cpython/rev/5f62c848f713
New changeset bc322854c336 by Georg Brandl in branch 'default':
Issue #17838:
Changes by Georg Brandl ge...@python.org:
--
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17585
___
___
Python-bugs-list
Tshepang Lekhonkhobe added the comment:
Ok. I thought doc fixes were exempt. Strange policy there.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16805
___
Changes by Georg Brandl ge...@python.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15902
___
___
Python-bugs-list
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
Removed file: http://bugs.python.org/file30227/diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17957
___
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
Added file: http://bugs.python.org/file30230/diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17957
___
Changes by Georg Brandl ge...@python.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17585
___
___
Python-bugs-list
Tshepang Lekhonkhobe added the comment:
uploaded the correct one; sori
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17957
___
___
Georg Brandl added the comment:
Please do not comment on policies if you don't understand our release system.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16805
___
Changes by Nick Coghlan ncogh...@gmail.com:
--
priority: normal - high
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17959
___
___
Serhiy Storchaka added the comment:
3.2?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17838
___
___
Python-bugs-list mailing list
Unsubscribe:
Nick Coghlan added the comment:
I elaborated on this point in
http://python-notes.boredomandlaziness.org/en/latest/python3/enum_creation.html#support-for-alternate-declaration-syntaxes
However, I'm now wondering if the problem is simply that the no extension of
enums rule is more restrictive
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17959
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 31eaf8a137ea by Georg Brandl in branch '3.2':
Issue #15535: Fix pickling of named tuples.
http://hg.python.org/cpython/rev/31eaf8a137ea
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 9da98ab823c9 by Georg Brandl in branch '3.2':
Issue #17843: Remove bz2 test data that triggers antivirus warnings.
http://hg.python.org/cpython/rev/9da98ab823c9
--
___
Python tracker
Roundup Robot added the comment:
New changeset d5b5116bf953 by Serhiy Storchaka in branch '3.2':
Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
http://hg.python.org/cpython/rev/d5b5116bf953
--
___
Python tracker
Roundup Robot added the comment:
New changeset 1c01571ce0f4 by Georg Brandl in branch '3.2':
Issue #17915: Fix interoperability of xml.sax with file objects returned by
http://hg.python.org/cpython/rev/1c01571ce0f4
--
nosy: +python-dev
___
Python
Roundup Robot added the comment:
New changeset 854ba6f414a8 by Georg Brandl in branch '3.2':
Issue #1159051: Back out a fix for handling corrupted gzip files that
http://hg.python.org/cpython/rev/854ba6f414a8
--
___
Python tracker
Roundup Robot added the comment:
New changeset c31ff361cde3 by Serhiy Storchaka in branch '3.2':
Close #17666: Fix reading gzip files with an extra field.
http://hg.python.org/cpython/rev/c31ff361cde3
--
stage: commit review - committed/rejected
___
Mark Dickinson added the comment:
Sorry: this is not a bug, but a difficult-to-avoid consequence of
floating-point imprecision: math.log(n, 2) is computed as log(n) / log(2), and
each of the log computations and the division can introduce small errors.
For what it's worth, Python 3.3 has a
Mark Dickinson added the comment:
Postscript: depending on what you're doing, you might also find the
int.bit_length method helpful.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17958
Georg Brandl added the comment:
Not necessary as per msg188301.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17838
___
___
Python-bugs-list
Ethan Furman added the comment:
Another approach to handling this, and other, issues is to allow options to
EnumMeta. My original aenum code had the default Enum class as unordered, no
duplicates allowed, non-indexable, etc., but then allowed options to be passed
in such as DUPLICATES to
Georg Brandl added the comment:
Fixed in 3.2, 3.3 and default.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17915
___
Changes by Georg Brandl ge...@python.org:
--
priority: release blocker - normal
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1159051
___
___
Changes by Georg Brandl ge...@python.org:
--
versions: -Python 2.7, Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1159051
___
Roundup Robot added the comment:
New changeset 9c2831fe84e9 by Georg Brandl in branch '3.3':
Back out patch for #1159051, which caused backwards compatibility problems.
http://hg.python.org/cpython/rev/9c2831fe84e9
New changeset 5400e8fbc1de by Georg Brandl in branch 'default':
null-merge
Roundup Robot added the comment:
New changeset 6c5a3d194a10 by Georg Brandl in branch '3.3':
Closes issue #17732: ignore install-directory specific options in
http://hg.python.org/cpython/rev/6c5a3d194a10
--
nosy: +python-dev
___
Python tracker
Mark Dickinson added the comment:
For tracker archaeologists: see also issue #11888, issue #9959.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17958
___
New submission from Nick Coghlan:
I encountered an interesting suggestion [1] regarding the enum.Enum convenience
API: use the member names as their values, rather than the current integers
starting from one.
Since we're now using definition order rather than value order for iteration,
this
Changes by Nick Coghlan ncogh...@gmail.com:
--
dependencies: +Code, test, and doc review for PEP-0435 Enum
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17961
___
Nick Coghlan added the comment:
Another post-incorporation proposal (issue 17961) relating to the values used
for the functional API.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17947
Ethan Furman added the comment:
Make it simpler:
class EnumMeta():
allow_subclass = False
class MyEnumMeta(EnumMeta):
allow_subclass = True
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17954
Antoine Pitrou added the comment:
Mostly looks good to me, but I think I'd prefer that attempts to clear
a running frame raise RuntimeError with an appropriate message.
Hmm, why not. My intuition was to make frame.clear() a best-effort
method, but this sounds ok too.
I also wonder how this
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17961
___
___
Python-bugs-list
Antoine Pitrou added the comment:
Stefan, I took a quick look at your patch. There is a couple things
that stands out.
It would be nice if you could reconcile each other's work. Especially so
I don't re-implement framing on top of something else :-)
Adding a binary version opcode for GLOBAL
Changes by Georg Brandl ge...@python.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17732
___
New submission from Antoine Pitrou:
3.3 and default are currently fetching OpenSSL 1.0.1d for the Windows builds.
It seems OpenSSL 1.0.1d was a kind of brown paper bag release, they've
released 1.0.1e since (some of test_ssl can fail on 1.0.1d and succeed on
1.0.1e, as experienced on my Linux
Ethan Furman added the comment:
After more thought, I think we should leave the shortened version of
_StealthProperty as is.
The reasoning being that if _StealthProperty does the __getattr__ lookup
itself, and fails, it will return an AttributeError... and then Python will use
__getattr__
Antoine Pitrou added the comment:
Opened #17962 to tackle the broken OpenSSL issue.
--
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17425
Eli Bendersky added the comment:
Nick, could you open a separate issue for the frame hack discussion, like you
did for the other things? You can make this one depend on it, if you feel it's
a blocker, but let's please not intermix more discussion here.
--
Nick Coghlan added the comment:
Specifically, my suggestion is that for auto-created enum members, the
invariant asset x.value == str(x) should hold.
In flufl.enum, using integers made sense because it relies on sorting of values
to determine the iteration order. That's no longer a concern
Ethan Furman added the comment:
In flufl.enum integers also made since as that was the default back-end data
type.
Currently, the functional method allows a type declaration. The behavior there
could be tweaked such that no specification meant no value (a truly valueless
enum!), type=int
Nick Coghlan added the comment:
Hmm, that's an interesting point about allowing operations on the already
defined values.
You could get around that by requiring that the wrapper be explicit when
definined the alias:
class Shape(enum.Enum):
... rectangle = 1
... oblong =
Nick Coghlan added the comment:
Simply removing the restriction isn't actually appropriate, as the variants
that allow addition of new members should *not* allow addition of new
descriptors.
That's why I'm wondering if the current subclassing restriction is wrong: if
you subclass an Enum
1 - 100 of 186 matches
Mail list logo