So, it's returns too many similar data. We need to fix it immediately.
This method is based on the custom_code() method of the Code() provider and it should works like custom_code(), but it doesn't.
How works telephone() now:
>>> from mimesis import Personal
>>> s = {Personal('ru').telephone() for _ in range(2000)}
{'+7-(967)-072-06-28', '+7-(915)-272-71-92', '+7-(937)-072-06-28', ... }
>>> len(s)
14 # Only 14 unique values from 2000.
How it should work:
>>> import random
>>> from mimesis import Code
>>> mask = random.choice([
"+7-(96#)-###-##-##",
"+7-(92#)-###-##-##",
"+7-(93#)-###-##-##",
"+7-(91#)-###-##-##",
"+7-(999)-###-##-##",
"+7-(9##)-###-##-##",
"+7-(909)-###-##-##",
"+7-(968)-###-##-##"
])
>>> c = {Code('ru').custom_code(mask=mask) for _ in range(2000)}
{'+7-(921)-395-52-94', '+7-(955)-222-89-60', '+7-(978)-727-56-77', ... }
>>> len(c)
2000 # All values unique.
Similar problems are observed with other methods, such as identifier().
So, it's returns too many similar data. We need to fix it immediately.
This method is based on the
custom_code()
method of theCode()
provider and it should works likecustom_code()
, but it doesn't.How works
telephone()
now:How it should work:
Similar problems are observed with other methods, such as
identifier()
.P.S As i can judge, the problem not in a
seed
.