Algorithms in Python

2012-01-25 Thread Chetan Harjani
Is there any book or site on python algorithms which asks more and
teaches less, I don't want to get bored, and at the same time I want
to learn and act more. I use ubuntu. (just in case if its needed).
#ALGORITHMS



--
Chetan H Harjani
IIT Delhi
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Algorithms in Python

2012-01-25 Thread Chetan Harjani
Thanks Alec for the link. U know I wanted to read this book by Simon
Singh -> The Code Book, I hear its good.

Thanks Nizamov for the link, I am really looking forward to join the
class, and since its free, it is totally an asset.

Yes Thijs I have seen this book, and since its such a big book, I am
avoiding it right now but I really liked the author's style when I
read his book on python language.

Thanks Visgean, the links seem really valuable

Thanking all
with regards

Chetan H Harjani
IIT Delhi
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Algorithms in Python

2012-01-26 Thread Chetan Harjani
On Thu, Jan 26, 2012 at 2:22 AM, Martin Schöön  wrote:
> On 2012-01-25, Chetan Harjani  wrote:
>> Thanks Alec for the link. U know I wanted to read this book by Simon
>> Singh -> The Code Book, I hear its good.
>>
> It indeed is. I only remember one error, an error every Scandinavian
> would have spotted.
>
> His book on Fermat's theorem is even better.

I have read the Fermat's theorem, it is really good.


-- 
Chetan H Harjani
IIT Delhi
-- 
http://mail.python.org/mailman/listinfo/python-list


what happens inside?

2011-06-22 Thread Chetan Harjani
why tuples are immutable whereas list are mutable?
why when we do x=y where y is a list and then change a element in x, y
changes too( but the same is not the case when we change the whole value in
x ), whereas, in tuples when we change x, y is not affected and also we cant
change each individual element in tuple. Someone please clarify.

-- 
echo "Impossible" | cat > /dev/null
-- 
http://mail.python.org/mailman/listinfo/python-list


Interpreting Left to right?

2011-06-23 Thread Chetan Harjani
x=y="some string"
And we know that python interprets from left to right. so why it doesnt
raise a name error here saying name 'y' is not defined?

another example:
(1,2) + 3,
here, python raises a  TypeError "can only concatenate tuple(not int) to
tuple" but we know (3,) is a tuple as seen by following:
t=3,
type(t)

Arent both of this contradicting?

-- 
Chetan H Harjani
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Interpreting Left to right?

2011-06-24 Thread Chetan Harjani
Now its all clear. Thanks
@ethan .. ur example is really scary.
I didnt understand ur example fully although.
See this is what i take it as:
x=x['huh']={}

>first python checks check that there are two = operators.
>so it evaluates the RHS(since for = it is RHS to LHS) experession of right
most (why is that?)
>now it assigns that experrsion({...}) to x the left most as u said first
RHS to LHS then LHS to RHS.
>then it assigns x to to x['huh'].
huh!!, ryt?
may be it doesnt make sense but i guess this is the only way to actually not
raise an error.

Where am I wrong?





On Fri, Jun 24, 2011 at 10:02 AM, Chetan Harjani
wrote:

> x=y="some string"
> And we know that python interprets from left to right. so why it doesnt
> raise a name error here saying name 'y' is not defined?
>
> another example:
> (1,2) + 3,
> here, python raises a  TypeError "can only concatenate tuple(not int) to
> tuple" but we know (3,) is a tuple as seen by following:
> t=3,
> type(t)
> 
> Arent both of this contradicting?
>
> --
> Chetan H Harjani
>
>


-- 
Chetan H Harjani
-- 
http://mail.python.org/mailman/listinfo/python-list


Learning python reading software source code

2011-08-25 Thread Chetan Harjani
Hello friends,

I have learned the basic syntax of python through the book HOW TO THINK LIKE
A COMPUTER SCIENTIST n by reading first 10-11 chapters of Apress-BEGINNING
PROGRAMMING FROM NOVICE TO PROFESSIONAL.
(btw it was really very boring)

I am looking forward to learn further by understanding source code of
applications built in python. I guess i will begin with reading the source
code of MIRO http://www.getmiro.com/ .

So I am looking for suggestions on how one can understand the code better.
Any specific references I should look in as I stumble upon libraries n
functions while reading or just the python official docs would be enough?

thanking you
-- 
Chetan H Harjani
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Learning python reading software source code

2011-08-26 Thread Chetan Harjani
Thanks Michael :) . I will keep your suggestions in mind.

On Fri, Aug 26, 2011 at 9:01 AM, Chetan Harjani wrote:

> Hello friends,
>
> I have learned the basic syntax of python through the book HOW TO THINK
> LIKE A COMPUTER SCIENTIST n by reading first 10-11 chapters of
> Apress-BEGINNING PROGRAMMING FROM NOVICE TO PROFESSIONAL.
> (btw it was really very boring)
>
> I am looking forward to learn further by understanding source code of
> applications built in python. I guess i will begin with reading the source
> code of MIRO http://www.getmiro.com/ .
>
> So I am looking for suggestions on how one can understand the code better.
> Any specific references I should look in as I stumble upon libraries n
> functions while reading or just the python official docs would be enough?
>
> thanking you
> --
> Chetan H Harjani
>
>
>


-- 
Chetan H Harjani
-- 
http://mail.python.org/mailman/listinfo/python-list