```python import os def check_encoding(stream, encoding): """Test, whether the encoding of `stream` matches `encoding`.
Returns
:None: if `encoding` or `stream.encoding` are not a valid encoding argument (e.g. ``None``) or `stream.encoding is missing. :True: if the encoding argument resolves to the same value as `encoding`, :False: if the encodings differ. """ try: return codecs.lookup(stream.encoding) == codecs.lookup(encoding) except (LookupError, AttributeError, TypeError): return None
java代码块
1 2 3 4 5 6 7 8 9 10
import java.util.Map
publicclassTest { publicstaticvoidmain(String[] args){ // MovieLensALS movie = new MovieLensALS(); System.out.println("Hello, I'm Java"); - } }