Re: [Tutor] List Comprehension Syntax

2012-12-23 Thread Malcolm Newsome
y for integer k def finder(list, k): try: s = sorted([int(i) for i in list]) k = int(k) except ValueError: print "Args must be ints. Your list arg was: {0} and your k arg was '{1}'." .format(list, k) return None if k in s: print &

Re: [Tutor] Get/Set/Attribute Accessors in Python?

2012-12-07 Thread Malcolm Newsome
nd the integration team couldn't load the software onto the system. >Why? It handn't compiled, someone had taken out one line too many >with >the editor!!! Now we're giving advice in relatively real time, and >sometimes we get it wrong. Thankfully no

Re: [Tutor] Get/Set/Attribute Accessors in Python?

2012-12-05 Thread Malcolm Newsome
Thanks gentlemen! Your answers were very thorough and helpful. I'll play with this some. Malcolm Newsome ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Get/Set/Attribute Accessors in Python?

2012-12-05 Thread Malcolm Newsome
I trying to relate two topics that have nothing to do with each other?) Hopefully these questions are clear enough... Thanks in advance, Malcolm Newsome ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://ma

Re: [Tutor] map() practice

2012-10-20 Thread Malcolm Newsome
Hello all, I looked at map() tonight. I think I have a decent understanding now of "how" it works. However, I'm wondering when it is most commonly used in the real world and if you could provide some examples (I like to do a lot of web stuff...it that helps with regards to providing a contex

[Tutor] Apprenticeships

2012-09-29 Thread Malcolm Newsome
, if not a formal apprenticeship, a shop that's looking for a very self-motivated Junior Dev that is quite eager to learn, contribute, and be mentored). I apologize if this is an improper request for this forum. Many thanks in advance! Malcolm Newsome malcolm.news...@gmail.com <m

[Tutor] Coding Challenges

2012-05-21 Thread Malcolm Newsome
t;challenge" of sorts? Then, those who participated could receive suggestions on how their code could have been written differently. If not, and you know of something else like this that exists, would you kindly share those resources? Thanks! Malcolm Newsome Sent f

[Tutor] Virtualenv Error

2011-04-24 Thread Malcolm Newsome
Hey All, Does anyone have any experience creating virtualenvs that can assist me with this error. I'm running windows 7, python 2.7.1 and virtualenv 1.6. I installed virtualenv using easy_install and there were no errors. I get the following error when trying to create a virtualenv.

[Tutor] Virtualenv Error

2011-04-09 Thread Malcolm Newsome
Hey All, I installed virtualenv and am getting this error when trying to create one. I'm running Windows 7. Can anyone help?? Thanks! Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Malcolm>virtualenv chipysite New python executabl

Re: [Tutor] Guessing Game Program

2011-03-26 Thread Malcolm Newsome
s > random_num:# user gets second chance if number is too high print retry("high", random_num) else: print nope_message(random_num) if __name__ == "__main__": main() -Original Message- From: Donald Bedsole [mailto:drbeds...@gmail.com] Sent: T

Re: [Tutor] Guessing Game Program

2011-03-24 Thread Malcolm Newsome
Hey Don! I posted an eerily similar request to another python group about two weeks ago! I, too, am very new to programming and the guessing game was my first shot at writing a script from scratch! Below is my code (improved with some help from others). I still would like to make some improveme