Re: problem with python 3.5.0

2016-03-18 Thread Oscar Benjamin
On 18 Mar 2016 17:42, "Mark Lawrence" wrote: > > On 18/03/2016 16:56, nasrin maarefi via Python-list wrote: >> >> HelloI installed the python 3.5.0(32bit) on 64bit win10 but I dont know how to install numpy pakage for this? I did not find something good on internet. could you please guide me?wher

Re: crash while using PyCharm / Python3

2016-03-18 Thread Daniel Wilcox
> > Host OS:Ubuntu Desktop 14.04 LTS / Unity > > System crashed while using PyCharm / Python3. > Booting takes forever and stuck at the purple screen with > the Ubuntu logo and the five dots cycling. > How to fix? > First off your machine not booting isn't really Python related. Python may ha

Re: E-commerce system in Python

2016-03-18 Thread Chris Warrick
On 18 March 2016 at 05:25, Arshpreet Singh wrote: > I am looking for an E-commerce system in python to sell things things online, > which can also be responsive for Android and IOS. > > A quick Google search brought me http://getsaleor.com/ it uses Django, Is > there any available one using Fl

Re: Bash-like pipes in Python

2016-03-18 Thread Stefan Otte
I wrote this little lib "pelper" [0] which has the elixir inspired pipe [1]. I initially had an implementation that used operator overloading but found that the "|" syntax was not really necessary. I just use the function `pipe` [2] Some examples from the repo: ``pipe`` allows you to turn somethi

Re: How to waste computer memory?

2016-03-18 Thread Gene Heskett
On Thursday 17 March 2016 17:37:02 alister wrote: > On Fri, 18 Mar 2016 07:42:30 +1100, Chris Angelico wrote: > > On Fri, Mar 18, 2016 at 7:31 AM, wrote: > >> Rick Johnson wrote: > >>> In the event that i change my mind about Unicode, and/or for the > >>> sake of others, who may want to know, p

Re: sobering observation, python vs. perl

2016-03-18 Thread Ben Bacarisse
Marko Rauhamaa writes: > "Charles T. Smith" : > >> Actually, I saw a study some years ago that concluded that python >> could be both slower and faster than perl, but that perl had much less >> deviation than python. I took that and accepted it, but was surprised >> now that in exactly the field

Re: Bash-like pipes in Python

2016-03-18 Thread Steven D'Aprano
On Thu, 17 Mar 2016 02:22 am, Omar Abou Mrad wrote: > Would be nice if this was possible: > get_digits = Filter(str.isdigit) | Map(int) 'kjkjsdf399834' | get_digits Yes it would. I'll work on that. > Also, how about using '>>' instead of '|' for "Forward chaining" Any particular re

Re: empty clause of for loops

2016-03-18 Thread Sven R. Kunze
On 16.03.2016 17:56, Sven R. Kunze wrote: On 16.03.2016 17:37, Random832 wrote: On Wed, Mar 16, 2016, at 11:17, Sven R. Kunze wrote: I can imagine that. Could you describe the general use-case? From what I know, "else" is executed when you don't "break" the loop. When is this useful? for ite

Re: Replace weird error message?

2016-03-18 Thread Chris Angelico
On Thu, Mar 17, 2016 at 5:53 AM, Ben Finney wrote: >> For example a hint that "0" does work for the given argument. > > I suggest: “zero-padding only allowed for numeric types, not 'str'”. That's very slightly misleading too; zero padding is perfectly legal as long as you force the alignment: >>

Re: sobering observation, python vs. perl

2016-03-18 Thread Ethan Furman
On 03/17/2016 10:35 AM, Charles T. Smith wrote: On Thu, 17 Mar 2016 10:26:12 -0700, Ethan Furman wrote: On 03/17/2016 09:36 AM, Charles T. Smith wrote: Yes, your point was to forgo REs despite that they are useful. I could have thought the search would have been better as: 'release[-.:

Re: Case Statements

2016-03-18 Thread Antoon Pardon
Op 17-03-16 om 09:57 schreef Marko Rauhamaa: > Antoon Pardon : > >> Op 16-03-16 om 20:27 schreef Marko Rauhamaa: >>> Antoon Pardon : Look at decorators. They don't provide functionality we wouldn't have without them. So we don't actually need them. Do you argue that introducing them

Re: Bash-like pipes in Python

2016-03-18 Thread Joel Goldstick
On Wed, Mar 16, 2016 at 10:57 AM, Steven D'Aprano wrote: > There's a powerful technique used in shell-scripting languages like bash: > pipes. The output of one function is piped in to become the input to the > next function. > > According to Martin Fowler, this was also used extensively in Smallt

Re: why x is changed in the following program?

2016-03-18 Thread Peter Otten
maurice.char...@telecom-paristech.fr wrote: > from numpy import random > x=random.randn(6) In Python > y=x doesn't make a copy, it binds y to the same object as x. From now on every modification you apply to y > y[0]=12 affects x, too, because x and y refer to the same object. > print x[0

Re: Case Statements

2016-03-18 Thread BartC
On 16/03/2016 14:31, Marko Rauhamaa wrote: BartC : Even Ruby has one. case when this when that That's a different topic. Yes but, if Ruby has it, why shouldn't Python? (Aren't they rivals or something?) which is exactly equivalent to if this... elif that... (when th

Re: submodules

2016-03-18 Thread ast
"Peter Otten" <__pete...@web.de> a écrit dans le message de news:mailman.312.1458299016.12893.python-l...@python.org... ast wrote: ok, thx -- https://mail.python.org/mailman/listinfo/python-list

Re: retrieve key of only element in a dictionary (Python 3)

2016-03-18 Thread Chris Angelico
On Sat, Mar 19, 2016 at 8:33 AM, Fillmore wrote: > what am I missing? I don't want to iterate over the dictionary. > I know that there's only one element and I need to retrieve the key You could try: >>> next(iter(d)) Is that clean enough for usage? ChrisA -- https://mail.python.org/mailman/l

Re: Fetch Gmail Archieved messages

2016-03-18 Thread Arshpreet Singh
On Friday, 18 March 2016 11:14:44 UTC+5:30, Rick Johnson wrote: > # > # BEGIN CODE > # > import imaplib > > def inbox_week(): > emailAddress = '...@gmail.com' > emailPassword = 'mypassword' > # START ADDING CODE HERE > # > # END CODE > # Well I am asking for real help.(!suggestions)

Re: monkey patching __code__

2016-03-18 Thread Sven R. Kunze
On 18.03.2016 15:33, Sven R. Kunze wrote: On 18.03.2016 15:23, Ian Kelly wrote: On Fri, Mar 18, 2016 at 7:47 AM, Ian Kelly wrote: Your patched version takes two extra arguments. Did you add the defaults for those to the function's __defaults__ attribute? And as an afterthought, you'll likely

Re: Cant install virtualenv

2016-03-18 Thread Terry Reedy
On 3/17/2016 2:12 AM, Arjun Prathap wrote: While trying to install virtualenv in my system(windows 10 Home) using pip You need to give exact details on how you installed Python and how you tried to 'use pip'. i'm getting the following error... -- Terry Jan Reedy -- https://mail.python.o

Re: empty clause of for loops

2016-03-18 Thread Random832
On Wed, Mar 16, 2016, at 11:17, Sven R. Kunze wrote: > I can imagine that. Could you describe the general use-case? From what I > know, "else" is executed when you don't "break" the loop. When is this > useful? for item in collection: if good(item): thing = item break else: th

sobering observation, python vs. perl

2016-03-18 Thread Charles T. Smith
I've really learned to love working with python, but it's too soon to pack perl away. I was amazed at how long a simple file search took so I ran some statistics: $ time python find-rel.py ./find-relreq *.out | sort -u TestCase_F_00_P TestCase_F_00_S TestCase_F_01_S TestCa

Re: WP-A: A New URL Shortener

2016-03-18 Thread Chris Angelico
(Bouncing back to the list) On Thu, Mar 17, 2016 at 10:32 PM, Vinicius wrote: > Sorry for my bad English guys. Your English is fine. Don't stress about it. :) >> Em 15 de mar de 2016, às 9:34 PM, Chris Angelico escreveu: >> >>> On Wed, Mar 16, 2016 at 11:31 AM, Erik wrote: >>> I often li

Re: from a module return a class

2016-03-18 Thread John Gordon
In kevind0...@gmail.com writes: > As requested , full code for promptUser_PWord So promptUser_PWord is a module? Well, I'm confused. You gave us this bit of code: user_pword = promptUser_PWord() But that can't work if promptUser_PWord is a module; modules aren't callable. promptUs

Re: from a module return a class

2016-03-18 Thread Laurent Pointal
John Gordon wrote: > In <56eaecc8$0$3658$426a7...@news.free.fr> Laurent Pointal > writes: > >> >> user_pword = promptUser_PWord() >> > >> > Show us the complete definition of promptUser_PWord(). > >> AFAIU It looks to be the module… > > If it were a module, it wouldn't be callable. It ha

Beautifulsoap

2016-03-18 Thread eproser
Greetings NG please I need a little help. I have this bs object tag: I want extract 5.69 Some have pity of me :-) Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Case Statements

2016-03-18 Thread Antoon Pardon
Op 17-03-16 om 00:14 schreef Chris Angelico: > def monkeypatch(cls): > orig = globals()[cls.__name__] > print("Monkeypatch",id(cls),"into",id(orig)) > for attr in dir(cls): > if not attr.startswith("_"): > setattr(orig,attr,getattr(cls,attr)) > return orig > > cl

Re: empty clause of for loops

2016-03-18 Thread Sven R. Kunze
On 17.03.2016 01:27, Steven D'Aprano wrote: That post describes the motivating use-case for the introduction of "if...else", and why break skips the "else" clause: for x in data: if meets_condition(x): break else: # raise error or do additional processing It might help to r

Re: Replace weird error message?

2016-03-18 Thread Chris Angelico
On Thu, Mar 17, 2016 at 7:55 AM, Terry Reedy wrote: > On 3/16/2016 3:08 PM, Chris Angelico wrote: >> >> On Thu, Mar 17, 2016 at 5:53 AM, Ben Finney >> wrote: For example a hint that "0" does work for the given argument. >>> >>> >>> I suggest: “zero-padding only allowed for numeric types

Re: sobering observation, python vs. perl

2016-03-18 Thread Mark Lawrence
On 17/03/2016 16:36, Charles T. Smith wrote: On Thu, 17 Mar 2016 09:21:51 -0700, Ethan Furman wrote: well, I don't want to forgo REs in order to have python's numbers be better The issue is not avoiding REs, but using Python's strengths and idioms. Write the code in Python's style, get

Re: How to waste computer memory?

2016-03-18 Thread Terry Reedy
On 3/18/2016 11:26 AM, Marko Rauhamaa wrote: There's no problem providing pure Unicode strings. Things get iffy when Python's OS abstraction pretends sys.stdin is text or filenames are strings. On Windows, filenames are arrays of wide chars, not bytes, and are better modeled as 3.x strings ra

discussion group for Python in finance?

2016-03-18 Thread beliavsky--- via Python-list
Is there an active online group discussing the use of Python in finance? Here are some resources for Python in finance I know of. Numpy, scipy, pandas, and matplotlib are useful packages discussed in the books "Python for Finance" by Hilpisch and "Python for Data Analysis" by McKinney. Quandl is

Re: sobering observation, python vs. perl

2016-03-18 Thread srinivas devaki
please upload the log file, and global variables in python are slow, so just keep all that in a function and try again. generally i get 20-30% time improvement by doin that. On Thu, Mar 17, 2016 at 8:59 PM, Charles T. Smith wrote: > I've really learned to love working with python, but it's too

Re: How to waste computer memory?

2016-03-18 Thread Random832
On Fri, Mar 18, 2016, at 03:00, Ian Kelly wrote: > jmf has been asked this before, and as I recall he seems to feel that > UTF-8 should be used for all purposes, ignoring the limitations of > that encoding such as that indexing becomes a O(n) operation. Just to play devil's advocate, here, why is

Re: sobering observation, python vs. perl

2016-03-18 Thread Marko Rauhamaa
"Charles T. Smith" : > Actually, I saw a study some years ago that concluded that python > could be both slower and faster than perl, but that perl had much less > deviation than python. I took that and accepted it, but was surprised > now that in exactly the field of application that I've traditi

Re: from a module return a class

2016-03-18 Thread Wolfgang Maier
On 3/18/2016 20:19, kevind0...@gmail.com wrote: so what I get from the various postings is promptUser_PWord must be converted to a class. True? A simple function would also do. Just make sure that the return is inside a callable block. -- https://mail.python.org/mailman/listinfo/python-li

Re: Beautifulsoap

2016-03-18 Thread eproser
Yes, for my hobby i want extract odds. The code is: from bs4 import BeautifulSoup import urllib2 url = "http://www.betexplorer.com/soccer/england/premier-league-2014-2015/results/"; content = urllib2.urlopen(url).read() soup = BeautifulSoup(content) odds = soup.find_all("td", class_="odds"

Re: Fetch Gmail Archieved messages

2016-03-18 Thread Arshpreet Singh
On Tuesday, 15 March 2016 22:32:42 UTC+5:30, Rick Johnson wrote: > Is that last line doing what you think it's doing? Let's > break it down... Basically you have one condition, that is > composed of two main components: > > Component-1: EMAIL in str(msg[header]) > > and > > Component-

crash while using PyCharm / Python3

2016-03-18 Thread Adam
Host OS:Ubuntu Desktop 14.04 LTS / Unity System crashed while using PyCharm / Python3. Booting takes forever and stuck at the purple screen with the Ubuntu logo and the five dots cycling. How to fix? -- https://mail.python.org/mailman/listinfo/python-list

Re: retrieve key of only element in a dictionary (Python 3)

2016-03-18 Thread Terry Reedy
On 3/18/2016 5:39 PM, Daniel Wilcox wrote: I think you're looking for something like popitem(). d = {'asdf':1} d.popitem()[0] 'asdf' Only if he wants the item removed. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: retrieve key of only element in a dictionary (Python 3)

2016-03-18 Thread Fillmore
OK, this seems to do the trick, but boy is it a lot of code. Anythong more pythonic? >>> l = list(d.items()) >>> l [('squib', '007')] >>> l[0] ('squib', '007') >>> l[0][0] 'squib' >>> On 03/18/2016 05:33 PM, Fillmore wrote: I must be missing something simple, but... Python 3.4.0 (default,

Re: How to waste computer memory?

2016-03-18 Thread Chris Angelico
On Sat, Mar 19, 2016 at 3:05 PM, Ian Kelly wrote: > On Fri, Mar 18, 2016 at 3:19 PM, Mark Lawrence > wrote: >> >> I have no idea at what the above can mean, other than that you are agreeing >> with the RUE. > > Mark, are you aware that this is a rather classic ad hominem of guilt > by associatio

Re: retrieve key of only element in a dictionary (Python 3)

2016-03-18 Thread Martin A. Brown
>> But, I still don't understand why this works and can't puzzle it >> out. I see a sequence on the left of the assignment operator and a >> dictionary (mapping) on the right. > >When you iterate over a dictionary, you get its keys: > >scores = {"Fred": 10, "Joe": 5, "Sam": 8} >for person in scor

Re: How to waste computer memory?

2016-03-18 Thread Ian Kelly
On Fri, Mar 18, 2016 at 3:19 PM, Mark Lawrence wrote: > > I have no idea at what the above can mean, other than that you are agreeing > with the RUE. Mark, are you aware that this is a rather classic ad hominem of guilt by association? "I didn't pay any attention to your actual argument, but you

Re: TSP in python ; this is code to solve tsp whenever called, where given coordinates as in name of pos and then start coordinate as in start, help me how it works ?

2016-03-18 Thread Joel Goldstick
On Fri, Mar 18, 2016 at 1:42 PM, Mark Lawrence wrote: > On 18/03/2016 17:04, Qurrat ul Ainy wrote: > >> help required !!! >> >> > For what, house cleaning? > > I googled TSP and found the Traveling Salesman Problem. The shortest path to a bunch of places that ends at the starting point. Apparen

Re: How to waste computer memory?

2016-03-18 Thread Chris Angelico
On Sat, Mar 19, 2016 at 9:03 AM, Marko Rauhamaa wrote: > Also, special-casing '\0' and '/' is > lame. Why can't I have "Results 1/2016" as a filename? Would you be allowed to have a directory named "Results 1" as well? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: How to waste computer memory?

2016-03-18 Thread Jussi Piitulainen
Ian Kelly writes: > On Thu, Mar 17, 2016 at 1:21 PM, Rick Johnson > wrote: >> In the event that i change my mind about Unicode, and/or for >> the sake of others, who may want to know, please provide a >> list of languages that *YOU* think handle Unicode better than >> Python, starting with the be

Re: How to waste computer memory?

2016-03-18 Thread Ian Kelly
On Fri, Mar 18, 2016 at 10:44 AM, Steven D'Aprano wrote: > On Sat, 19 Mar 2016 02:31 am, Random832 wrote: > >> On Fri, Mar 18, 2016, at 11:17, Ian Kelly wrote: >>> If the string is simple UCS-2, that's easy. > > Hmmm, well, nobody uses UCS-2 any more, since that only covers the first > 65536 code

Re: discussion group for Python in finance?

2016-03-18 Thread jogaserbia
unicode support in Python 3 is better than in python2 https://docs.python.org/3/howto/unicode.html What does this refer to (what are you getting at): > I was also told, a lot of code has been ported to > the Go language. -- https://mail.python.org/mailman/listinfo/python-list

Re: retrieve key of only element in a dictionary (Python 3)

2016-03-18 Thread Joel Goldstick
On Fri, Mar 18, 2016 at 6:08 PM, Fillmore wrote: > > OK, this seems to do the trick, but boy is it a lot of code. Anythong more > pythonic? > > >>> l = list(d.items()) > >>> l > [('squib', '007')] > >>> l[0] > ('squib', '007') > >>> l[0][0] > 'squib' Maybe this: l = list(d.items())[0][0] > > >

Re: retrieve key of only element in a dictionary (Python 3)

2016-03-18 Thread Chris Angelico
On Sat, Mar 19, 2016 at 12:27 PM, Martin A. Brown wrote: > But, I still don't understand why this works and can't puzzle it > out. I see a sequence on the left of the assignment operator and a > dictionary (mapping) on the right. When you iterate over a dictionary, you get its keys: scores = {"

Another python question

2016-03-18 Thread Alan Gabriel
Sorry for the multiple questions but my while loop is not working as intended. Here is the code : n = 1 list1 = [] count = 0 #amount of times program repeats steps = 0 # amount of steps to reach 1 step_list = [] while n!=0: n= int(input()) list1.append(n) length = len(list1) while count

Re: How to waste computer memory?

2016-03-18 Thread Ian Kelly
On Fri, Mar 18, 2016 at 8:56 AM, Random832 wrote: > On Fri, Mar 18, 2016, at 03:00, Ian Kelly wrote: >> jmf has been asked this before, and as I recall he seems to feel that >> UTF-8 should be used for all purposes, ignoring the limitations of >> that encoding such as that indexing becomes a O(n)

Re: How to waste computer memory?

2016-03-18 Thread Michael Torrie
On 03/18/2016 02:26 AM, Jussi Piitulainen wrote: > I think Julia's way of dealing with its strings-as-UTF-8 [2] is more > promising. Indexing is by bytes (1-based in Julia) but the value at a > valid index is the whole UTF-8 character at that point, and an invalid > index raises an exception. This

Re: Need explanation of this error

2016-03-18 Thread Steven D'Aprano
On Sat, 19 Mar 2016 04:25 am, Bryan Bateman wrote: > Having the same error with python 3.5 windows 64 bit and scipy for same on > Windows 10. I did dependency walker and it came up with a large number of > DLL's. Do you want the source of the scipy binary and the DLL list? Before we start worry

Re: from a module return a class

2016-03-18 Thread John Gordon
In Wolfgang Maier writes: > > So promptUser_PWord is a module? Well, I'm confused. You gave us this > > bit of code: > > > > user_pword = promptUser_PWord() > > > > But that can't work if promptUser_PWord is a module; modules aren't > > callable. promptUser_PWord() has to be a function

Re: Case Statements

2016-03-18 Thread Chris Angelico
On Thu, Mar 17, 2016 at 9:53 PM, Steven D'Aprano wrote: > On Thu, 17 Mar 2016 05:48 pm, Chris Angelico wrote: > >> Okay. Let's try this. > [...] >> Decorators work. Now let's try NOT using decorators. > > You are still using a decorator. You're just not using @ decorator syntax. Oops, sorry. That

Re: Bash-like pipes in Python

2016-03-18 Thread Sven R. Kunze
On 16.03.2016 16:09, Joel Goldstick wrote: symbol '|' in python. Can you elaborate bitwise or -- https://mail.python.org/mailman/listinfo/python-list

Re: DSLs in perl and python (Was sobering observation)

2016-03-18 Thread MRAB
On 2016-03-17 22:22, Mark Lawrence wrote: On 17/03/2016 17:47, Rustom Mody wrote: On Thursday, March 17, 2016 at 10:09:27 PM UTC+5:30, Charles T. Smith wrote: or something else ... you're in a "defend python at all costs!" mode. So now my questions: How do you in perl make regexps readable li

monkey patching __code__

2016-03-18 Thread Sven R. Kunze
Hi, we got an interesting problem. We need to monkeypatch Django's reverse function: First approach: urlresolvers.reverse = patched_reverse Problem: some of Django's internal modules import urlresolvers.reverse before we can patch it for some reasons. Second approach: urlresolvers.rev

AIX build and (potentially missing modules

2016-03-18 Thread Michael Felt
I have been packaging python for AIX - and wanting minimal dependancies I have been ignoring the final messages from make. Personally, I do not see any real harm in the missing *audio "bits", but how terrible are the other missing "bits" for normal python programs? Many thanks for feedback!

Re: Case Statements

2016-03-18 Thread Mark Lawrence
On 16/03/2016 11:16, BartC wrote: On 16/03/2016 11:07, Mark Lawrence wrote: I don't want to discourage you too much, but I think that adding a switch statement comes *very* low on the list of improvements we would like to make in Python 3.5. We should probably focus on speed ... OK, you're c

Beginner Python Help

2016-03-18 Thread Alan Gabriel
Hey there, I just started out python and I was doing a activity where im trying to find the max and min of a list of numbers i inputted. This is my code.. num=input("Enter list of numbers") list1=(num.split()) maxim= (max(list1)) minim= (min(list1)) print(minim, maxim) So the problem is th

Re: Bash-like pipes in Python

2016-03-18 Thread Chris Angelico
On Fri, Mar 18, 2016 at 1:10 AM, Steven D'Aprano wrote: > At the moment, the data being processed by the Map, Filter, etc. are > ordinary lists or iterators. In order to give them a customer __repr__, I > would have to change the Map and Filter __ror__ method to return some > custom type which beh

Re: WP-A: A New URL Shortener

2016-03-18 Thread Rick Johnson
On Wednesday, March 16, 2016 at 7:02:16 AM UTC-5, Daniel Wilcox wrote: > I dare say I'm with Rick on this point[...] Contrary to "pseudo popular belief", it's perfectly okay to agree with Rick (from time to time). Hey, even a stopped clock is correct twice a day! -- https://mail.python.org/mailma

Re: Fetch Gmail Archieved messages

2016-03-18 Thread Rick Johnson
On Thursday, March 17, 2016 at 11:14:48 PM UTC-5, Arshpreet Singh wrote: > Yes I am looking for in EMAIL string is present in > str(msg[header]) then do_something() > > I also run without str() but sometimes it causes weird > exception errors because you can't predict the behavior > msg[header].

Re: retrieve key of only element in a dictionary (Python 3)

2016-03-18 Thread Chris Angelico
On Sat, Mar 19, 2016 at 10:03 AM, Tim Chase wrote: > >>> d = {"squib": "007"} > >>> key, = d > >>> key > 'squib' > > I'd put a comment on the line to make it clear what's going on since > that comma is easy to miss, but based on Alex Martelli's testing[2], > it was the fastest of the propo

Re: DSLs in perl and python (Was sobering observation)

2016-03-18 Thread Rustom Mody
On Friday, March 18, 2016 at 6:52:53 PM UTC+5:30, Peter Otten wrote: > Rustom Mody wrote: > > > On Friday, March 18, 2016 at 4:17:06 AM UTC+5:30, MRAB wrote: > >> Stick an "x" on the end of the regex: /something/x or s/old/new/x. > > > > Thanks! > > > > Is there somewhere a regexp 'introspection

Re: How to waste computer memory?

2016-03-18 Thread Marko Rauhamaa
Chris Angelico : > On Sat, Mar 19, 2016 at 8:28 AM, Marko Rauhamaa wrote: >> The file system does not have a problem. Python has a problem because it >> tries to present pathnames as Unicode strings, which isn't always >> possible. > > But what does a file name *mean*? A Linux/UNIX file name is

Re: from a module return a class

2016-03-18 Thread kevind0718
On Thursday, March 17, 2016 at 4:59:32 PM UTC-4, Rick Johnson wrote: > On Thursday, March 17, 2016 at 1:24:10 PM UTC-5, Laurent Pointal wrote: > > So the error: SyntaxError: 'return' outside function > > My suspicion is the the OP misunderstands how modules work. He is assuming > that he can retu

Re: monkey patching __code__

2016-03-18 Thread Terry Reedy
On 3/18/2016 10:32 AM, Sven R. Kunze wrote: Just to understand this better: why is [function.__defaults__] > not part of the code object but part of the function? compile(codestring, ...) compiles code into a code object. Besides being used to compile function bodies, which do have a functio

Re: How to waste computer memory?

2016-03-18 Thread Random832
On Fri, Mar 18, 2016, at 20:55, Chris Angelico wrote: > On Sat, Mar 19, 2016 at 9:03 AM, Marko Rauhamaa wrote: > > Also, special-casing '\0' and '/' is > > lame. Why can't I have "Results 1/2016" as a filename? > > Would you be allowed to have a directory named "Results 1" as well? If I were des