"unhashable key" doesn't make sense to me. If it's a "key", it has to be
hashable, and I'd think it'd often be a sign of a bug if you were trying to
do "unhashable_value in mapping", so to me it seems good that it raises a
TypeError. It totally depends on what's on the RHS of the in -- for
instance
http://bugs.python.org/issue18510
Commenting further:
some_key in dict
is conceptually the same as
some_key in dict.keys()
which /would/ return False for an unhashable key -- at least it did in 2.x; for
3.x you have to say
some_key in list(dict.keys())
which seems like a step b
While working on issue #18508 I stumbled across this:
Traceback (most recent call last):
...
File "/usr/local/lib/python3.4/enum.py", line 417, in __new__
if value in cls._value2member_map:
TypeError: unhashable type: 'list'
I'll wrap it in a try-except block, but I must admit I was surpri
Serhiy Storchaka writes:
> I'm asking only about this case, when the dash is used to denote a
> break in a sentence or to set off parenthetical statements.
That's two separate cases:
* denote a break in a sentence
* set off parenthetical statements
In my experience, an em dash is commonly used
Serhiy Storchaka writes:
> I'm sorry, I were wrong. Actually em-dash used much more then en-dash
> in Python documentation.
But, as you've also discovered, many authors will type two hyphens “--”
when they want an em dash “—”, yet this is rendered to an en dash “–”.
So the prevalence of the latt
Serhiy Storchaka writes:
> 19.07.13 10:25, Ben Finney написав(ла):
> > Serhiy Storchaka writes:
> >> What type of dash is preferable in the documentation? The en dash
> >> (–) or the em dash (—)?
> >
> > They have different purposes; use whichever is appropriate for the
> > context.
>
> I mean o
ACTIVITY SUMMARY (2013-07-12 - 2013-07-19)
Python tracker at http://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open4092 (+25)
closed 26185 (+45)
total 30277 (+70)
Open issues wit
19.07.13 07:51, Steven D'Aprano написав(ла):
Optimistically, I think it would probably be safe[1] to replace " -- "
or " --- " in text with "\N{THIN SPACE}\N{EM DASH}\N{THIN SPACE}" (or
\N{HAIR SPACE} if you prefer) without human review, but for any other
changes, I wouldn't even try to automate
19.07.13 10:25, Ben Finney написав(ла):
Serhiy Storchaka writes:
What type of dash is preferable in the documentation? The en dash (–)
or the em dash (—)?
They have different purposes; use whichever is appropriate for the
context.
I mean only a context where a dash is used to denote a break
19.07.13 00:49, Ezio Melotti написав(ла):
On Thu, Jul 18, 2013 at 7:38 PM, Serhiy Storchaka wrote:
What type of dash is preferable in the documentation? The en dash (–) or the
em dash (—)?
Both should be used where appropriate [0].
Of course I looked in Wikipedia before asking on this list
18.07.13 21:55, Guido van Rossum написав(ла):
On Thu, Jul 18, 2013 at 11:46 AM, Serhiy Storchaka wrote:
Or we should replace a half-dozen of em-dashes found in Python documentation
to en-dashes?
If my theory is right that makes sense. Especially if it's only a half-dozen.
I'm sorry, I were
18.07.13 21:54, Brian Curtin написав(ла):
Besides visual consistency in a couple of places, is there a reason to
care enough to make a wholesale change?
Single hyphen instead of a dash just looks too ugly to me.
Trying to fix this I noticed that the documentation is inconsistent
regarding the
On 19/07/13 18:38, Nick Coghlan wrote:
I don't know about "common". I had no idea there were 3 dash types
*Way* more than three.
hyphen
minus sign (not the same as a hyphen!)
en-dash
em-dash
two-em-dash
three-em-dash
figure dash
horizontal bar
swung dash
plus another half-dozen or so non-Eng
Le Fri, 19 Jul 2013 18:38:05 +1000,
Nick Coghlan a écrit :
> On 19 July 2013 17:25, Ben Finney wrote:
> > Serhiy Storchaka writes:
> >
> >> What type of dash is preferable in the documentation? The en dash
> >> (-) or the em dash (--)?
> >
> > They have different purposes; use whichever is appro
On 19 July 2013 17:25, Ben Finney wrote:
> Serhiy Storchaka writes:
>
>> What type of dash is preferable in the documentation? The en dash (-)
>> or the em dash (--)?
>
> They have different purposes; use whichever is appropriate for the
> context.
>
> This isn't an official Python developer posi
Serhiy Storchaka writes:
> What type of dash is preferable in the documentation? The en dash (–)
> or the em dash (—)?
They have different purposes; use whichever is appropriate for the
context.
This isn't an official Python developer position. But all of ‘-’, ‘–’,
‘—’, ‘−’, etc. have distinct
16 matches
Mail list logo