Return whether or not the item is contained in this specifier. :param item: The item to check for. This is used for the ``in`` operator and behaves the same as :meth:`contains` with no ``prereleases`` argument passed. >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
(self, item: UnparsedVersion)
| 873 | return iter(self._specs) |
| 874 | |
| 875 | def __contains__(self, item: UnparsedVersion) -> bool: |
| 876 | """Return whether or not the item is contained in this specifier. |
| 877 | |
| 878 | :param item: The item to check for. |
| 879 | |
| 880 | This is used for the ``in`` operator and behaves the same as |
| 881 | :meth:`contains` with no ``prereleases`` argument passed. |
| 882 | |
| 883 | >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1") |
| 884 | True |
| 885 | >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1") |
| 886 | True |
| 887 | >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1") |
| 888 | False |
| 889 | >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1") |
| 890 | False |
| 891 | >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True) |
| 892 | True |
| 893 | """ |
| 894 | return self.contains(item) |
| 895 | |
| 896 | def contains( |
| 897 | self, |