Re: [Tutor] a few question about my evolving program

2015-08-12 Thread Alan Gauld
On 12/08/15 18:54, Clayton Kirkwood wrote: If I understand your 'question', your code *should* reduce to this for the given filename: Now, what is your expected output? And what are you getting? I'm not sure I understand what Question 2 actually is... Given the data provided one could

Re: [Tutor] a few question about my evolving program

2015-08-12 Thread Clayton Kirkwood
> -Original Message- > From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On > Behalf Of Steven D'Aprano > Sent: Wednesday, August 12, 2015 6:43 AM > To: tutor@python.org > Subject: Re: [Tutor] a few question about my evolving program > > On Tu

Re: [Tutor] a few question about my evolving program

2015-08-12 Thread Clayton Kirkwood
> -Original Message- > From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On > Behalf Of Alan Gauld > Sent: Wednesday, August 12, 2015 2:41 AM > To: tutor@python.org > Subject: Re: [Tutor] a few question about my evolving program > > On 12/08/15

Re: [Tutor] a few question about my evolving program

2015-08-12 Thread Clayton Kirkwood
> -Original Message- > From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On > Behalf Of Peter Otten > Sent: Wednesday, August 12, 2015 2:22 AM > To: tutor@python.org > Subject: Re: [Tutor] a few question about my evolving program > > Clayton Kirkwo

Re: [Tutor] a few question about my evolving program

2015-08-12 Thread Steven D'Aprano
On Tue, Aug 11, 2015 at 08:23:00PM -0700, Clayton Kirkwood wrote: > Question 2: > My current code: > See "Look here" below. There's an art to picking good variable names, neither too short nor too long, just descriptive enough without being too verbose. Or to put it another way... The existe

Re: [Tutor] a few question about my evolving program

2015-08-12 Thread Alan Gauld
On 12/08/15 04:23, Clayton Kirkwood wrote: Question 2: My current code: See "Look here" below. If I understand your 'question', your code *should* reduce to this for the given filename: ... target_directory_file_list = master_directory_file_list[target_directory] ... for current_directory_

Re: [Tutor] a few question about my evolving program

2015-08-12 Thread Peter Otten
Clayton Kirkwood wrote: > Look here: After some clean-up: > if current_filename in target_directory_file_list: >current_stat_info = os.stat( >current_directory_path + '/' + current_filename, >follow_symlinks=False) >current_file_size = current_stat_in

Re: [Tutor] a few question about my evolving program

2015-08-12 Thread Cameron Simpson
On 11Aug2015 22:33, Clayton Kirkwood wrote: >What is the purpose and how is the following definition focused on the *? >Turns out, you can't actually put the asterisk in the code, so what >does it mean? >os.stat(path, *, dir_fd=None, follow_symlinks=True) [...] Python function definition syntax

Re: [Tutor] a few question about my evolving program

2015-08-11 Thread Mark Lawrence
On 12/08/2015 06:33, Clayton Kirkwood wrote: I understand what you are saying. However, you guys are constantly asking for the original code. Now you are saying you are saying not the original code, rather a made up snippet, which very likely, for newbies like me, would bet bungled in creating a

Re: [Tutor] a few question about my evolving program

2015-08-11 Thread Clayton Kirkwood
> -Original Message- > From: Cameron Simpson [mailto:c...@zip.com.au] > Sent: Tuesday, August 11, 2015 8:46 PM > To: Clayton Kirkwood > Cc: tutor@python.org > Subject: Re: [Tutor] a few question about my evolving program > > On 11Aug2015 20:23, Clayton Kirkwo

Re: [Tutor] a few question about my evolving program

2015-08-11 Thread Cameron Simpson
On 11Aug2015 20:23, Clayton Kirkwood wrote: Question 1: What is the purpose and how is the following definition focused on the *? Turns out, you can't actually put the asterisk in the code, so what does it mean? os.stat(path, *, dir_fd=None, follow_symlinks=True) It is generally better to make

[Tutor] a few question about my evolving program

2015-08-11 Thread Clayton Kirkwood
Question 1: What is the purpose and how is the following definition focused on the *? Turns out, you can't actually put the asterisk in the code, so what does it mean? os.stat(path, *, dir_fd=None, follow_symlinks=True) Question 2: My current code: See "Look here" below. #Program to find duplicat