On 26/10/2013 13:20, Steven D'Aprano wrote:
On Thu, Oct 24, 2013 at 05:21:56PM +, Dave Angel wrote:
If you
want a surprise, try the following simple program some time.
import sys
print(sys.modules)
when I tried that interactively on 2.7, it printed some 240+ names.
Wow. What were you do
On Thu, Oct 24, 2013 at 05:21:56PM +, Dave Angel wrote:
> If you
> want a surprise, try the following simple program some time.
>
> import sys
> print(sys.modules)
>
> when I tried that interactively on 2.7, it printed some 240+ names.
Wow. What were you doing? Ah, I bet you had imported nu
On 25/10/2013 08:20, #PATHANGI JANARDHANAN JATINSHRAVAN# wrote:
> Hello All,
>
>>Similarly, if you call sorted() on a list of large strings,
> you get a new list, but the strings are not duplicated, so it's not
> nearly the duplication it might look like.
>
> 1. Sorry, but I did not understand t
e were you talking about 'a' which is removed from the stack when it goes
out of scope?
Thanking You,
Jatin
From: Tutor on behalf of
Dave Angel
Sent: Friday, October 25, 2013 01:21 AM
To: tutor@python.org
Subject: Re: [Tutor] Python and memory
> And does python being an interpreted language have to do anything with
this?
I have to interrupt: you mean to say: "And does the C implementation of
Python (CPython) have to do anything with this?". There are several
implementations of Python out there. Not all of them use an interpreter in
th
On 24/10/13 17:38, #PATHANGI JANARDHANAN JATINSHRAVAN# wrote:
on. So, is there a concept of heap and stack in python or is it
abstracted?
Joel and Dave have given you the answers to this bit
And does python being an interpreted language have to do
anything with this?
Nothing at all. In
On 24/10/2013 12:38, #PATHANGI JANARDHANAN JATINSHRAVAN# wrote:
> Hello All,
>
> Before starting to learn python, I first learnt C and C++ for a couple of
> years. In C/C++, the choice to assign memory during compile time or during
> execution time, i.e. assigning memory from the stack or th
On Thu, Oct 24, 2013 at 12:38 PM, #PATHANGI JANARDHANAN JATINSHRAVAN#
wrote:
> Hello All,
>
> Before starting to learn python, I first learnt C and C++ for a couple
> of years. In C/C++, the choice to assign memory during compile time or
> during execution time, i.e. assigning memory from the
Hello All,
Before starting to learn python, I first learnt C and C++ for a couple of
years. In C/C++, the choice to assign memory during compile time or during
execution time, i.e. assigning memory from the stack or the heap lay with the
programmer right? But in Python, I have only seen exa