Potential mistake in docstring of padded_key in crypto module

24 views
Skip to first unread message

Rishabh Goel

unread,
Sep 23, 2020, 11:07:08 AM9/23/20
to sympy
The docstring of padded_key() is as follows:
"""Return a string of the distinct characters of ``symbols`` with
    those of ``key`` appearing first, omitting characters in ``key``
    that are not in ``symbols``. A ValueError is raised if a) there are
    duplicate characters in ``symbols`` or b) there are characters
    in ``key`` that are  not in ``symbols``.

A ValueError is raised if there are characters in ``key`` which are not in ``symbols``. However, The docstring initially mentions that the characters in ``key`` will be omitted if not present in ``symbols`` and then a complete opposite follows. May  I fix this?

Aaron Meurer

unread,
Sep 25, 2020, 4:54:14 AM9/25/20
to sympy
Yes, this looks like it is contradictory. Please feel free to submit a pull request fixing it to match the actual behavior.

Aaron Meurer

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/00f89d0d-d759-4c8f-8f99-f60e7faa22e0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages