On Thu, 26 Nov 2015 08:02 pm, fl wrote:
> Hi,
>
> I see the following from a previous post:
>
>
> Python 1.5.2 (#1, Aug 27 2012, 09:09:18) [GCC 4.1.2 20080704 (Red Hat
> 4.1.2-52)] on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
import dis
code = compile("(1
On Thu, Nov 26, 2015 at 8:02 PM, fl wrote:
> Are there something, my input or Python difference
> make the output different?
Anything involving the disassembly of Python code depends heavily on
internal interpreter details. You just quoted something showing that
ancient versions of Python did at
fl writes:
> Python 1.5.2 (#1, Aug 27 2012, 09:09:18) [GCC 4.1.2 20080704 (Red Hat
> 4.1.2-52)] on linux2
The context of the post was discussing the behavior of a
very old version of python. I'm not sure how you missed
this.
> When I run the above three line code, I get the following:
Further
Hi,
I see the following from a previous post:
Python 1.5.2 (#1, Aug 27 2012, 09:09:18) [GCC 4.1.2 20080704 (Red Hat
4.1.2-52)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import dis
>>> code = compile("(1, 2, 3)", "", "eval")
>>> dis.dis(code)
0 S
On Tue, Oct 20, 2009 at 16:25, Aahz wrote:
> In article ,
> J wrote:
>>
>>The tuple thing is a new concept to me... at least the vocabulary is,
>>I'll go look that up now and learn info on tuples. It's been ages
>>since I did any python programming, and even back then it was fairly
>>simple stuf
In article ,
J wrote:
>
>The tuple thing is a new concept to me... at least the vocabulary is,
>I'll go look that up now and learn info on tuples. It's been ages
>since I did any python programming, and even back then it was fairly
>simple stuff (this was about 9 years ago)... so I'm relearning b
On Tue, Oct 20, 2009 at 14:53, Ethan Furman wrote:
> osVer = "%s Service Pack %d" % (os.Name.split("|")[0],
> os.ServicePackMajorVersion)
>
> This way, osVer is a string, and not a tuple.
Thanks for the help...
The tuple thing is a new concept to me... at least the vocabulary is,
I'll go
J wrote:
Can someone explain why this code results in two different outputs?
for os in comp.CIM_OperatingSystem ():
print os.Name.split("|")[0] + " Service Pack", os.ServicePackMajorVersion
osVer = os.Name.split("|")[0] + " Service Pack", os.ServicePackMajorVersion
print osVer
the first pri
On Oct 20, 2:23 pm, J wrote:
> Can someone explain why this code results in two different outputs?
>
> > for os in comp.CIM_OperatingSystem ():
> > print os.Name.split("|")[0] + " Service Pack", os.ServicePackMajorVersion
> > osVer = os.Name.split("|")[0] + " Service Pack", os.ServicePackMajorVe
Can someone explain why this code results in two different outputs?
> for os in comp.CIM_OperatingSystem ():
> print os.Name.split("|")[0] + " Service Pack", os.ServicePackMajorVersion
> osVer = os.Name.split("|")[0] + " Service Pack", os.ServicePackMajorVersion
> print osVer
the first print s
Given that the format is consistent (and the last char is not part of
the number you want), you can probably do something like this:
x = int('10944800e'[:-1])
Disclaimer: I am a n00b. YMMV ;-)
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 05 Oct 2005 07:24:31 -0700, Java and Swing wrote:
> i have printed out some numbers and they look like
>
> 10944800e
> 10952560d
They don't look like numbers to me. They have letters at the end. What are
they? What does the letter mean?
> ...if i want to later assign this type of numbe
doh! nevermind, my original output had e and d in it.
--
http://mail.python.org/mailman/listinfo/python-list
i have printed out some numbers and they look like
10944800e
10952560d
...if i want to later assign this type of number to variable how can i
do it?
for example i can't do...
>> x = 10944800e
..since it says "invalid token" on the "e".
thanks.
--
http://mail.python.org/mailman/listinfo/pyth
14 matches
Mail list logo