Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
Clean isbn (only legal characters) 

        def clean(isbnlike):
    """ Clean isbn (only legal characters) """
    cisbn = [c for c in isbnlike if c in LEGAL]
    buf = re.sub(r'\s*-\s*', '-', ''.join(cisbn))
    return re.sub(r'\s+', ' ', buf).strip()
        


src/i/s/isbntools-3.1.3/isbntools/__init__.py   isbntools(Download)
 
from .exceptions import quiet_errors
from .core import (is_isbn10, is_isbn13, to_isbn10, to_isbn13, clean,
                   canonical, notisbn, get_isbnlike, get_canonical_isbn)
from .ext import (mask, meta, info, editions, isbn_from_words)