Re: importlib changes from py3.7 to py3.8
Seems I've missed that __init__.py's aren't allowed to be empty anymore. Adding a single # solved the issue. Eren -- https://mail.python.org/mailman/listinfo/python-list
Re: importlib changes from py3.7 to py3.8
On 19/09/20 7:51 am, Eko palypse wrote: ValueError: source code string cannot contain null bytes Any idea what happened here? Seems I've missed that __init__.py's aren't allowed to be empty anymore. Adding a single # solved the issue. I just tried importing a package with an empty __init__.py in Python 3.8 and there was no problem: % ls -l empty total 0 -rw-r--r-- 1 greg staff 0 20 Sep 12:00 __init__.py % python3 Python 3.8.2 (default, Mar 23 2020, 11:36:18) [Clang 8.1.0 (clang-802.0.42)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import empty >>> It looks more like the file in question wasn't completely empty, but had a null character in it for some reason. I expect that if you re-saved it as truly empty it would work. If not, you should probably report it as a bug. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Puzzling difference between lists and tuples
William Pearson writes:
> ...
> for n in ('first'):
> print n
>
>
> ... but "f","i","r","s","t" in the second.
#+BEGIN_SRC: python
for n in ('first',):
print n
#+BEGIN_SRC
Then, that will print 'first'. And please use Python3...
Sincerely, Byung-Hee
--
^고맙습니다 _救濟蒼生_ 감사합니다_^))//
--
https://mail.python.org/mailman/listinfo/python-list
sorry for typo (Was: Re: Puzzling difference between lists and tuples)
> #+BEGIN_SRC: python
> for n in ('first',):
> print n
> #+BEGIN_SRC
The last 'BEGIN_SRC' should be 'END_SRC' so sorry ;;;
--
^고맙습니다 _救濟蒼生_ 감사합니다_^))//
--
https://mail.python.org/mailman/listinfo/python-list
