Closed francoisfreitag closed 9 months ago
@stefanfoulis do you remember why E.164 is the default over E.123 (INTERNATIONAL)?
@stefanfoulis do you remember why E.164 is the default over E.123 (INTERNATIONAL)? I don't know. :-/
I see. It might be a good idea to transition to the INTERNATIONAL
format by default. I’ll start the deprecation in the upcoming weeks, unless someone is concerned with changing the default?
I started looking at changing the default. I don’t think it’s worth the hassle. I assume most projects don’t use extensions, and the INTERNATIONAL
representation is slightly different:
>>> str(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.INTERNATIONAL))
'+44 20 8366 1177'
>>> str(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.E164))
'+442083661177'
The added spaces are sure to break code for someone, who doesn’t care about extensions at all. Unless there’s strong support for changing the default, it’ll stay as E164
.
Closes #581