Skip to content

Commit

Permalink
Mass replace '' -> None.
Browse files Browse the repository at this point in the history
To make use of the new 'errors' argument.

'' was used in the original Perl tables both to mean an unknown replacement and
an intentional replacement with and empty string. Here I only replace it in
ranges I've added later where I'm reasonably sure that '' means unknown
replacement.
  • Loading branch information
avian2 committed Dec 20, 2020
1 parent 35736d9 commit 3529535
Show file tree
Hide file tree
Showing 4 changed files with 395 additions and 395 deletions.
24 changes: 12 additions & 12 deletions unidecode/x1d4.py
Expand Up @@ -84,7 +84,7 @@
'e', # 0x52
'f', # 0x53
'g', # 0x54
'', # 0x55
None, # 0x55
'i', # 0x56
'j', # 0x57
'k', # 0x58
Expand Down Expand Up @@ -156,23 +156,23 @@
'y', # 0x9a
'z', # 0x9b
'A', # 0x9c
'', # 0x9d
None, # 0x9d
'C', # 0x9e
'D', # 0x9f
'', # 0xa0
'', # 0xa1
None, # 0xa0
None, # 0xa1
'G', # 0xa2
'', # 0xa3
'', # 0xa4
None, # 0xa3
None, # 0xa4
'J', # 0xa5
'K', # 0xa6
'', # 0xa7
'', # 0xa8
None, # 0xa7
None, # 0xa8
'N', # 0xa9
'O', # 0xaa
'P', # 0xab
'Q', # 0xac
'', # 0xad
None, # 0xad
'S', # 0xae
'T', # 0xaf
'U', # 0xb0
Expand All @@ -185,17 +185,17 @@
'b', # 0xb7
'c', # 0xb8
'd', # 0xb9
'', # 0xba
None, # 0xba
'f', # 0xbb
'', # 0xbc
None, # 0xbc
'h', # 0xbd
'i', # 0xbe
'j', # 0xbf
'k', # 0xc0
'l', # 0xc1
'm', # 0xc2
'n', # 0xc3
'', # 0xc4
None, # 0xc4
'p', # 0xc5
'q', # 0xc6
'r', # 0xc7
Expand Down
78 changes: 39 additions & 39 deletions unidecode/x1d6.py
Expand Up @@ -165,8 +165,8 @@
'z', # 0xa3
'i', # 0xa4
'j', # 0xa5
'', # 0xa6
'', # 0xa7
None, # 0xa6
None, # 0xa7
'Alpha', # 0xa8
'Beta', # 0xa9
'Gamma', # 0xaa
Expand Down Expand Up @@ -218,41 +218,41 @@
'chi', # 0xd8
'psi', # 0xd9
'omega', # 0xda
'', # 0xdb
'', # 0xdc
'', # 0xdd
'', # 0xde
'', # 0xdf
'', # 0xe0
'', # 0xe1
'', # 0xe2
'', # 0xe3
'', # 0xe4
'', # 0xe5
'', # 0xe6
'', # 0xe7
'', # 0xe8
'', # 0xe9
'', # 0xea
'', # 0xeb
'', # 0xec
'', # 0xed
'', # 0xee
'', # 0xef
'', # 0xf0
'', # 0xf1
'', # 0xf2
'', # 0xf3
'', # 0xf4
'', # 0xf5
'', # 0xf6
'', # 0xf7
'', # 0xf8
'', # 0xf9
'', # 0xfa
'', # 0xfb
'', # 0xfc
'', # 0xfd
'', # 0xfe
'', # 0xff
None, # 0xdb
None, # 0xdc
None, # 0xdd
None, # 0xde
None, # 0xdf
None, # 0xe0
None, # 0xe1
None, # 0xe2
None, # 0xe3
None, # 0xe4
None, # 0xe5
None, # 0xe6
None, # 0xe7
None, # 0xe8
None, # 0xe9
None, # 0xea
None, # 0xeb
None, # 0xec
None, # 0xed
None, # 0xee
None, # 0xef
None, # 0xf0
None, # 0xf1
None, # 0xf2
None, # 0xf3
None, # 0xf4
None, # 0xf5
None, # 0xf6
None, # 0xf7
None, # 0xf8
None, # 0xf9
None, # 0xfa
None, # 0xfb
None, # 0xfc
None, # 0xfd
None, # 0xfe
None, # 0xff
)

0 comments on commit 3529535

Please sign in to comment.