4 Replies - 694 Views - Last Post: 12 September 2011 - 08:23 AM Rate Topic: -----

#1 Simown  Icon User is offline

  • Blue Sprat
  • member icon

Reputation: 315
  • View blog
  • Posts: 650
  • Joined: 20-May 10

What makes Python, Python?

Posted 11 September 2011 - 04:44 PM

It's rapidly approaching - I have an internship interview for next year at the Google offices on Wednesday, scary, I know. One of the two interviews will be "coding" on a whiteboard to solve one (or possibly more) programming problems. I have chosen Python, of course!

What I'd like to know is, what things make Python the language it is: What features are different from other languages? What shall I avoid? What impresses people? I learnt the language but have had little feedback on any of my code.

These are the kind of things I'm looking for:

#To get a n-length array of 0s
[0]*n

#Get an attribute or return "Not Found"
dict.get(attr, "Not Found")

#Avoid subclassing multiple classes (even though it's possible)
class A(X, Y):
    pass



It's a while since I picked up the "Beginning Python" book, with no formal teaching, even if it's the most obvious of things (to you) let me know! It's going to be a hard interview, I need all the prep I can get! :smartass:

Is This A Good Question/Topic? 0
  • +

Replies To: What makes Python, Python?

#2 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 450
  • View blog
  • Posts: 795
  • Joined: 08-June 10

Re: What makes Python, Python?

Posted 11 September 2011 - 05:07 PM

I can't recommend Python Tips, Tricks, and Hacks enough. It covers all those tricky edge cases you usually have to test out in the interactive session expanded out, and covers things you'd never think to ask about.
Was This Post Helpful? 4
  • +
  • -

#3 Simown  Icon User is offline

  • Blue Sprat
  • member icon

Reputation: 315
  • View blog
  • Posts: 650
  • Joined: 20-May 10

Re: What makes Python, Python?

Posted 11 September 2011 - 05:40 PM

Thanks Motoma. That's exactly the kind of things, I don't think I can write all of them on the back of my hand though :P That's a pretty long list but I'm sure it's not exhaustive! Some hacks are python 2.x only I think, I'll test them out to be safe (as they may ask me? Who knows!)
Was This Post Helpful? 0
  • +
  • -

#4 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 731
  • View blog
  • Posts: 1,877
  • Joined: 23-December 08

Re: What makes Python, Python?

Posted 12 September 2011 - 07:02 AM

It might be worth knowing that the creator of Python, Guido Van Rossum, does work full time at Google.
Was This Post Helpful? 2
  • +
  • -

#5 Simown  Icon User is offline

  • Blue Sprat
  • member icon

Reputation: 315
  • View blog
  • Posts: 650
  • Joined: 20-May 10

Re: What makes Python, Python?

Posted 12 September 2011 - 08:23 AM

I didn't know that :o I thought he was a freelance Python-eer or something.

I don't know if I want to work for them, or even if I could, but the experience will be invaluable for any future career really - and I need something to show off with :P
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1