# A Python rant about types

**URL:** <https://discourse.julialang.org/t/a-python-rant-about-types/43294>\
**Category:** Offtopic\
**Created:** [July 18, 2020, 5:07pm UTC](https://discourse.julialang.org/t/a-python-rant-about-types/43294 "2020-07-18T17:07:46Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![Liso](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@Liso](https://discourse.julialang.org/u/Liso)\
**Post date:** [July 24, 2020, 2:32pm UTC](https://discourse.julialang.org/t/a-python-rant-about-types/43294/22 "2020-07-24T14:32:26Z")

</div>

According to [PEP-381](https://www.python.org/dev/peps/pep-0383) it is based on UTF-8b.

> [@StefanKarpinski](#):
>
> ```julia
> julia> codepoint(line[4])
> 0x0000005b
> 
> ```

It seems that this type of solution was analyzed but abandoned in python. See explanation from that PEP:

_“… , the approach of escaping each byte XX with the sequence U+0000 U+00XX has the disadvantage that encoding to UTF-8 will introduce a NUL byte in the UTF-8 sequence. As a consequence, C libraries may interpret this as a string termination, even though the string continues. In particular, the gtk libraries will truncate text in this case; other libraries may show similar problems.”_

(There are also described some security concerns about supporting everything)

---

_[View the full topic](https://discourse.julialang.org/t/a-python-rant-about-types/43294)._
