Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31615 > unrolled thread

Remove uncide notation

Started byAshish Jain <ashishjain.ash@gmail.com>
First post2012-10-18 02:27 -0700
Last post2012-10-19 11:48 -0700
Articles 5 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  Remove uncide notation Ashish Jain <ashishjain.ash@gmail.com> - 2012-10-18 02:27 -0700
    Re: Remove uncide notation Chris Rebert <clp2@rebertia.com> - 2012-10-18 02:40 -0700
      Re: Remove uncide notation Ashish Jain <ashishjain.ash@gmail.com> - 2012-10-18 03:19 -0700
      Re: Remove uncide notation Ashish Jain <ashishjain.ash@gmail.com> - 2012-10-18 03:19 -0700
    Re: Remove uncide notation 88888 Dihedral <dihedral88888@googlemail.com> - 2012-10-19 11:48 -0700

#31615 — Remove uncide notation

FromAshish Jain <ashishjain.ash@gmail.com>
Date2012-10-18 02:27 -0700
SubjectRemove uncide notation
Message-ID<e3a36bc8-ccaa-4bf5-a005-f7c016fe1de2@googlegroups.com>
Hi,

I have a html string in an object, when I do repr() of that object, I get value as:

{'Id' : 1, 'Body': u'<p> Hello </p>'}

I don't wish to have 'u' as the character in my string representation. As this is not a valid json notation now.

Thanks for your help

-Ashish

[toc] | [next] | [standalone]


#31617

FromChris Rebert <clp2@rebertia.com>
Date2012-10-18 02:40 -0700
Message-ID<mailman.2415.1350553209.27098.python-list@python.org>
In reply to#31615
On Thu, Oct 18, 2012 at 2:27 AM, Ashish Jain <ashishjain.ash@gmail.com> wrote:
> Hi,
>
> I have a html string in an object, when I do repr() of that object, I get value as:
>
> {'Id' : 1, 'Body': u'<p> Hello </p>'}
>
> I don't wish to have 'u' as the character in my string representation. As this is not a valid json notation now.

If you want JSON, then *use the freakin' `json` std lib module*!
http://docs.python.org/library/json.html

repr(...) != JSON
[It's similar only coincidentally, and only to a degree.]

Regards,
Chris

[toc] | [prev] | [next] | [standalone]


#31624

FromAshish Jain <ashishjain.ash@gmail.com>
Date2012-10-18 03:19 -0700
Message-ID<91ac0219-88d2-4df0-a5ae-6804c764b843@googlegroups.com>
In reply to#31617
On Thursday, 18 October 2012 15:10:33 UTC+5:30, Chris Rebert  wrote:
> On Thu, Oct 18, 2012 at 2:27 AM, Ashish Jain wrote:
> 
> > Hi,
> 
> >
> 
> > I have a html string in an object, when I do repr() of that object, I get value as:
> 
> >
> 
> > {'Id' : 1, 'Body': u'<p> Hello </p>'}
> 
> >
> 
> > I don't wish to have 'u' as the character in my string representation. As this is not a valid json notation now.
> 
> 
> 
> If you want JSON, then *use the freakin' `json` std lib module*!
> 
> http://docs.python.org/library/json.html
> 
> 
> 
> repr(...) != JSON
> 
> [It's similar only coincidentally, and only to a degree.]
> 
> 
> 
> Regards,
> 
> Chris

Thanks a lot!!

[toc] | [prev] | [next] | [standalone]


#31625

FromAshish Jain <ashishjain.ash@gmail.com>
Date2012-10-18 03:19 -0700
Message-ID<mailman.2422.1350555564.27098.python-list@python.org>
In reply to#31617
On Thursday, 18 October 2012 15:10:33 UTC+5:30, Chris Rebert  wrote:
> On Thu, Oct 18, 2012 at 2:27 AM, Ashish Jain wrote:
> 
> > Hi,
> 
> >
> 
> > I have a html string in an object, when I do repr() of that object, I get value as:
> 
> >
> 
> > {'Id' : 1, 'Body': u'<p> Hello </p>'}
> 
> >
> 
> > I don't wish to have 'u' as the character in my string representation. As this is not a valid json notation now.
> 
> 
> 
> If you want JSON, then *use the freakin' `json` std lib module*!
> 
> http://docs.python.org/library/json.html
> 
> 
> 
> repr(...) != JSON
> 
> [It's similar only coincidentally, and only to a degree.]
> 
> 
> 
> Regards,
> 
> Chris

Thanks a lot!!

[toc] | [prev] | [next] | [standalone]


#31754

From88888 Dihedral <dihedral88888@googlemail.com>
Date2012-10-19 11:48 -0700
Message-ID<294a15a0-c822-45d0-b738-808ffce200e4@googlegroups.com>
In reply to#31615
Ashish Jain於 2012年10月18日星期四UTC+8下午5時27分04秒寫道:
> Hi,
> 
> 
> 
> I have a html string in an object, when I do repr() of that object, I get value as:
> 
> 
> 
> {'Id' : 1, 'Body': u'<p> Hello </p>'}
> 
> 
> 
> I don't wish to have 'u' as the character in my string representation. As this is not a valid json notation now.
> 
> 
> 
> Thanks for your help
> 
> 
> 
> -Ashish

I remembered about 15 years ago that the MS office and IE were
supporting different languages all over the world to collect money$$$!

Of course there were ISO standards. But in business Wintel did 
several very good jobs before year 2000 for those different encodings of 
languages.

Now the unicode is the default standard in software development 
for multi-lingual supports of web sites all over the world. 
 

 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web