Re: [Tutor] How python keeps track of data types

2016-03-29 Thread Abhishek Kumar
Thanks everyone for answers and links.I wasn't aware of fact that python names are just references to Objects. Abhishek On Tue, Mar 29, 2016 at 1:01 AM, Abhishek Kumar wrote: > Hello > I am a computer science student,I want to know how python keeps track of > data types of variables and is the

Re: [Tutor] How python keeps track of data types

2016-03-29 Thread Danny Yoo
Hi Abhishek, On Mon, Mar 28, 2016 at 12:31 PM, Abhishek Kumar wrote: > Hello > I am a computer science student,I want to know how python keeps track of > data types of variables and is there a way to get data types of variables > without actually running the script(with type() function). I think

Re: [Tutor] How python keeps track of data types

2016-03-28 Thread Steven D'Aprano
On Tue, Mar 29, 2016 at 01:01:57AM +0530, Abhishek Kumar wrote: > Hello > I am a computer science student,I want to know how python keeps track of > data types of variables and is there a way to get data types of variables > without actually running the script(with type() function). I think python

Re: [Tutor] How python keeps track of data types

2016-03-28 Thread Ben Finney
Abhishek Kumar writes: > I am a computer science student,I want to know how python keeps track > of data types of variables Python doesn't track the type of a variable, because a variable never has any information about type. What Python calls “variables” are names, referring to objects. Names

Re: [Tutor] How python keeps track of data types

2016-03-28 Thread Alan Gauld
On 28/03/16 20:31, Abhishek Kumar wrote: > I am a computer science student,I want to know how python keeps track of > data types of variables and is there a way to get data types of variables > without actually running the script(with type() function). First, recall that Python variables are jus

[Tutor] How python keeps track of data types

2016-03-28 Thread Abhishek Kumar
Hello I am a computer science student,I want to know how python keeps track of data types of variables and is there a way to get data types of variables without actually running the script(with type() function). I think python AST can help, but am unable to figure out.Please help me. I've explored