Yeah, if you look in the docs here
https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
"Bytes literals are always prefixed with
and the bytes link shows https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
"Bytes literals are always prefixed with
'b'
or 'B'
; they produce an instance of the bytes
type instead of the str
type. They may only contain ASCII characters; bytes with a numeric value of 128 or greater must be expressed with escapes."https://docs.python.org/3/library/stdtypes.html#bytes
------
"The antidote to apocalypticism is apocalyptic civics. Apocalyptic civics is the insistence that we cannot ignore the truth, nor should we panic about it. It is a shared consciousness that our institutions have failed and our ecosystem is collapsing, yet we are still here — and we are creative agents who can shape our destinies. Apocalyptic civics is the conviction that the only way out is through, and the only way through is together. "
Greg Bloom @greggish https://twitter.com/greggish/status/873177525903609857
"The antidote to apocalypticism is apocalyptic civics. Apocalyptic civics is the insistence that we cannot ignore the truth, nor should we panic about it. It is a shared consciousness that our institutions have failed and our ecosystem is collapsing, yet we are still here — and we are creative agents who can shape our destinies. Apocalyptic civics is the conviction that the only way out is through, and the only way through is together. "
Greg Bloom @greggish https://twitter.com/greggish/status/873177525903609857
On 6 October 2017 at 09:35, Lachlan Musicman <datakid@gmail.com> wrote:
L.I'd imagine that's the new Python3 system. content is a bytestring, not unicode?Cheers------
"The antidote to apocalypticism is apocalyptic civics. Apocalyptic civics is the insistence that we cannot ignore the truth, nor should we panic about it. It is a shared consciousness that our institutions have failed and our ecosystem is collapsing, yet we are still here — and we are creative agents who can shape our destinies. Apocalyptic civics is the conviction that the only way out is through, and the only way through is together. "
Greg Bloom @greggish https://twitter.com/greggish/status/873177525903609857 On 6 October 2017 at 00:55, <utpalbrahma1995@gmail.com> wrote:The below code looks wierd.--def __init__(self, content=b'', *args, **kwargs): super(HttpResponse, self).__init__(*args, **kwargs) # Content is a bytestring. See the `content` property methods. self.content = content
The wierd part is /// content=b''///
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/02a0b8a6-e4b9 .-4d68-bc94-1fde59f60f08%40goog legroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGBeqiPmgL0L8BZf%3DuKEzZmJv_nip8HrMm0PQSa06-UZsyWsfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment