Find and return a User ID that matches the search string given. :param search: A text string to match name, comment, or email address against :type search: ``str``, ``unicode`` :return: The first matching :py:obj:`~pgpy.PGPUID`, or ``None`` if no matches were found.
(self, search)
| 1836 | self |= uid |
| 1837 | |
| 1838 | def get_uid(self, search): |
| 1839 | """ |
| 1840 | Find and return a User ID that matches the search string given. |
| 1841 | |
| 1842 | :param search: A text string to match name, comment, or email address against |
| 1843 | :type search: ``str``, ``unicode`` |
| 1844 | :return: The first matching :py:obj:`~pgpy.PGPUID`, or ``None`` if no matches were found. |
| 1845 | """ |
| 1846 | if self.is_primary: |
| 1847 | return next((u for u in self._uids if search in filter(lambda a: a is not None, (u.name, u.comment, u.email))), None) |
| 1848 | return self.parent.get_uid(search) |
| 1849 | |
| 1850 | def del_uid(self, search): |
| 1851 | """ |
no outgoing calls