Re: [Tutor] Case Insensitive Globing

2019-05-18 Thread Steven D'Aprano
On Sun, May 19, 2019 at 10:37:56AM +1000, Steven D'Aprano wrote: > That's not quite right -- case sensitivity of the OS isn't important, > case sensitivity of the *file system* is. And the standard file system > on Mac OS, HFS+, defaults to case-preserving but case-insensitive. > > (There is

Re: [Tutor] Case Insensitive Globing

2019-05-18 Thread Steven D'Aprano
On Sat, May 18, 2019 at 11:52:29AM +0100, Alan Gauld via Tutor wrote: > On 18/05/2019 03:14, Richard Damon wrote: > > > The same directory, running the same program under Mac OS X, which also > > is a case insensitive file system, > > That is your mistake. Darwin, the core of the MacOS X system

Re: [Tutor] How arguments to the super() function works?

2019-05-18 Thread Steven D'Aprano
On Sat, May 18, 2019 at 09:51:39PM +0530, Arup Rakshit wrote: > Here, why super(Role, self).__init__(**kwargs) is used instead of > super().__init__(**kwargs) ? What that Role and self argument is > instructing the super() ? The Role and self arguments are the owning class and current

Re: [Tutor] How arguments to the super() function works?

2019-05-18 Thread Mark Lawrence
On 18/05/2019 17:21, Arup Rakshit wrote: I am writing an Flask app following a book, where a piece of python concept I am not getting how it works. Code is: class Role(db.Model): __tablename__ = 'roles' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64),

Re: [Tutor] How arguments to the super() function works?

2019-05-18 Thread Alan Gauld via Tutor
On 18/05/2019 17:21, Arup Rakshit wrote: > class Role(db.Model): > > def __init__(self, **kwargs): > super(Role, self).__init__(**kwargs) > > Here, why super(Role, self).__init__(**kwargs) is used instead > of super().__init__(**kwargs) ? I suspect you are reading an older

[Tutor] How arguments to the super() function works?

2019-05-18 Thread Arup Rakshit
I am writing an Flask app following a book, where a piece of python concept I am not getting how it works. Code is: class Role(db.Model): __tablename__ = 'roles' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), unique=True) default =

Re: [Tutor] [SPAM?] Re: Case Insensitive Globing

2019-05-18 Thread Richard Damon
On 5/18/19 6:52 AM, Alan Gauld via Tutor wrote: > On 18/05/2019 03:14, Richard Damon wrote: > >> The same directory, running the same program under Mac OS X, which also >> is a case insensitive file system, > That is your mistake. Darwin, the core of the MacOS X system > is a version of BSD Unix

Re: [Tutor] simple question about scope SOLVED

2019-05-18 Thread marcus lütolf
Many thanks for this quick answer. I unfortunatly misread the tutorial (edx Course CS1301xII, Computing in Python II: Control Structures) concerning scope insofar as a NameError arises if a variable is accessed which was not created inside the control structure. Marcus. -Ursprüngliche

Re: [Tutor] Case Insensitive Globing

2019-05-18 Thread Mats Wichmann
On 5/17/19 8:14 PM, Richard Damon wrote: > I am working on a program to process some files created by an old > windows program that created it files with varying case with a python > program. > > Using glob.glob on Windows seems to ignore the case, and find all the > matching files. > > The same

Re: [Tutor] simple question about scope

2019-05-18 Thread Mats Wichmann
On 5/18/19 2:20 AM, marcus lütolf wrote: > Dear experts > > in learning the principles of Python I came across scope in the > control structure's section. > There I read the notion that variables createted inside a > control structute can't be seen or accessed from outside that > structure,

Re: [Tutor] Case Insensitive Globing

2019-05-18 Thread Alan Gauld via Tutor
On 18/05/2019 03:14, Richard Damon wrote: > The same directory, running the same program under Mac OS X, which also > is a case insensitive file system, That is your mistake. Darwin, the core of the MacOS X system is a version of BSD Unix and like all Unix OS is very much case sensitive. Some

Re: [Tutor] simple question about scope

2019-05-18 Thread Alan Gauld via Tutor
On 18/05/2019 09:20, marcus lütolf wrote: > in learning the principles of Python I came across scope in the > control structure's section. > There I read the notion that variables createted inside a > control structute can't be seen or accessed from outside that > structure, Python would raise a

[Tutor] Case Insensitive Globing

2019-05-18 Thread Richard Damon
I am working on a program to process some files created by an old windows program that created it files with varying case with a python program. Using glob.glob on Windows seems to ignore the case, and find all the matching files. The same directory, running the same program under Mac OS X,

[Tutor] simple question about scope

2019-05-18 Thread marcus lütolf
Dear experts in learning the principles of Python I came across scope in the control structure's section. There I read the notion that variables createted inside a control structute can't be seen or accessed from outside that structure, Python would raise a Name Error. However in for loops -