* Chris Hengge <[EMAIL PROTECTED]> [061119 00:44]:
> That must be part of Pythons shiny ability of dynamic data types? Must be a
> messy operation to change data-types like that.. I think I'll just do my
> best to work with the right data-types the whole time ;D
Well, huge miss understanding:
a =
That must be part of Pythons shiny ability of dynamic data types? Must be a
messy operation to change data-types like that.. I think I'll just do my
best to work with the right data-types the whole time ;D
On 11/18/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
"Chris Hengge" <[EMAIL PROTECTED]> wro
"Chris Hengge" <[EMAIL PROTECTED]> wrote
> Not that it changes your reply, but just for my own sanity:
> int('7' * 10 ** 6) <- does this not just type-cast a char into an
> int?
Chris, I suspect you may come from a C background?
Type *conversion* in Python is very differentb from
type *casting*
Chris Hengge wrote:
> Not that it changes your reply, but just for my own sanity:
> int('7' * 10 ** 6) <- does this not just type-cast a char into an int?
it typecasts a 1,000,000 character long string to an integer.
>
> Meaning that rather then consuming 1024k as you stated, it would
> consume 20
On 18/11/06, Chris Hengge <[EMAIL PROTECTED]> wrote:
> Not that it changes your reply, but just for my own sanity:
> int('7' * 10 ** 6) <- does this not just type-cast a char into an int?
>
> Meaning that rather then consuming 1024k as you stated, it would consume
> 2048k at the peak of the calcul
Tim,
Every now and then you pop up on the tutor list to answer
"interesting" posts like this:
"Tim Peters" <[EMAIL PROTECTED]> wrote
> That much does /only/ the decimal-string -> large binary integer
> part.
> Don't display i until the next step. For display, it's /enormously/
> faster to conve
Not that it changes your reply, but just for my own sanity:
int('7' * 10 ** 6) <- does this not just type-cast a char into an int?
Meaning that rather then consuming 1024k as you stated, it would consume
2048k at the peak of the calculation(2bytes per char? * 1m = 2048k) then
typecasting to int w
[Thomas]
> Earlier today I typed the following into my pythonwin interactive
> interpreter in windows xp:
>
> >>> int('7' * 10 ** 6)
>
> I expected either an error message
Unlikely, if your box has enough RAM to run WinXP :-)
> or it to get stuck and require me to stop the process manually.
Not
A mildly educated guess would be that python tried to access memory
Windows wasn't going to allow it to have, effectively causing a BSOD and
making Windows restart the system.
Thomas wrote:
> Earlier today I typed the following into my pythonwin interactive
> interpreter in windows xp:
>
>
Chris Hengge wrote:
> I'm thinking you either have a problem with a memory leak (my memory
> isn't changing, just at 100% CPU), or your CPU overheated from poor
> cooling since it is at 100% utilization.
yeah I second this...
there's no reason why this would reboot your computer.
At Chris: It's b
I'm thinking you either have a problem with a memory leak (my memory isn't
changing, just at 100% CPU), or your CPU overheated from poor cooling since
it is at 100% utilization.
On 11/17/06, Chris Hengge <[EMAIL PROTECTED]> wrote:
Well, I dont get the point.. its not locking up my system or any
Well, I dont get the point.. its not locking up my system or anything.. its
just crunching away... even while I type this...
I guess your point is that it should stop since a 32 bit O/S can only count
to:
4,294,967,296
On 11/17/06, Thomas <[EMAIL PROTECTED]> wrote:
Earlier today I typed the fol
Earlier today I typed the following into my pythonwin interactive
interpreter in windows xp:
int('7' * 10 ** 6)
I expected either an error message or it to get stuck and require me to
stop the process manually.
I read that unlike long integers in C, longs in python are only limited by
the amo
13 matches
Mail list logo