py-dz-phone-number
بواسطة @01walid
29
Algerian phone numbers as a value object implementation in Python
عن هذا المشروع
Algerian phone numbers as a value object Inspired from the PHP implementation with some differences (see below). Algerian phone numbers as a value object implementation in Python. This can be used in your domain models or be integrated with your favorite framework. What is value object? In computer science, a value object is a small object that represents a simple entity whose equality is not based on identity: i.e. two value objects are equal when they have the same value, not necessarily being the same object. Read more on wikipedia. Installation: Usage: Equality Correctness Immutability The object can't be modified if you try to modify of its members, a TypeError will be raised: Understanding the regex 03 main parts of the full number are categorized into three groups: indicative (Country Code), Operator or Region (e.g. Ooredoo or Annaba), and the rest of the dial number. The regex uses Python's capturing group feature built in its regex engine. Where "Country Code", "Operator or Region" and the "Number" are put into numbered groups when matched. The regex also uses a conditional statemet in the form of (?(1)yes no) where (1) is the capturing group number.
من ملف README الخاص بالمشروع على GitHub
- النجوم
- 29
- التفريعات
- 1
- الرخصة
- MIT
- آخر تحديث
- 16/06/2020
المواضيع
أضف هذه الشارة إلى ملف README
أظهر أن مشروعك مُدرج على «صُنع في الجزائر».
[](https://www.madeinalgeria.dev/projects/py-dz-phone-number)