Re: Python 3.6.0a2 is now available
On Monday, 13 June 2016 23:57:20 UTC-4, Ned Deily wrote: > On behalf of the Python development community and the Python 3.6 release > team, I'm happy to announce the availability of Python 3.6.0a2. > 3.6.0a2 is the first of four planned alpha releases of Python 3.6, > the next major release of Python. During the alpha phase, Python 3.6 > remains under heavy development: additional features will be added > and existing features may be modified or deleted. Please keep in mind > that this is a preview release and its use is not recommended for > production environments. > > You can find Python 3.6.0a2 here: > > https://www.python.org/downloads/release/python-360a2/ > > The next release of Python 3.6 will be 3.6.0a3, currently scheduled for > 2016-07-11. > > Enjoy! > > --Ned > > -- > Ned Deily > n...@python.org -- [] I see that the Array Class now provides for data of the double type, this is good, but why is there no provision for data of the complex type? Is this omission intended? Colin W. -- https://mail.python.org/mailman/listinfo/python-list
Re: Numeric Python
Numeric => numarray => numpy is in a state of transition. It might be better if you installed the latest version of numpy. Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: method names nounVerb or verbNoun
On 05-Feb-10 14:53 PM, Wanderer wrote: Which is the more accepted way to compose method names nounVerb or verbNoun? For example voltageGet or getVoltage? getVoltage sounds more normal, but voltageGet is more like voltage.Get. I seem to mix them and I should probably pick one way and stick with it. Thanks I prefer verbNoun. Let's remember that PEP 8 is a guide, not a set of rules. Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.
On 17-Feb-10 05:48 AM, Bruno Desthuilliers wrote: Lawrence D'Oliveiro a écrit : In message <60b1abce-4381-46ab-91ed- f2ab2154c...@g19g2000yqe.googlegroups.com>, Andrej Mitrovic wrote: Also, lambda's are expressions, not statements ... Is such a distinction Pythonic, or not? Python is (by design) a statement-based language, so yes, this distinction is pythonic !-) Aren't lambda forms better described as function? Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: assigning multi-line strings to variables
On 27-Apr-10 22:31 PM, Brendan Abel wrote: On Apr 27, 7:20 pm, goldtech wrote: Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks. d="d d" d Traceback (most recent call last): File "", line 1, in NameError: name 'd' is not defined d = "d"\ "d" or d = "dd\ dd" You don't need the trailing slash in the first example if you are writing this in a script, python assumes it. What about: *** Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32. *** >>> a= ''' Now is the time for ... all good men ... to come to the aid ... of the party''' >>> print (a) Now is the time for all good men to come to the aid of the party >>> Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: ooolib, reading writing a spread sheet and keep formatting
On 28-Apr-10 23:18 PM, Kushal Kumaran wrote: On Thu, Apr 29, 2010 at 5:46 AM, News123 wrote: Hi, I'm making first attempts to modify a few cells of an openoffice spreadsheet. Try the xlrd and xlwt modules, and the documentation at http://www.python-excel.org/ The tutorial here is beautifully done: http://python-excel.googlegroups.com/web/python-excel.pdf?gda=68Un3kIAAABrjVmXvI2FnKbK79o6Y1oCuHLcf1VKsaM-EVGjvOiGtNXEtWX7y7b6ByPnawQ3OxpV4u3aa4iAIyYQIqbG9naPgh6o8ccLBvP6Chud5KMzIQ Does it fly with .ods files? Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: array matching
On 29-Apr-10 14:46 PM, MRAB wrote: Bill Jordan wrote: Hey guys, I am sorry if this is not the right list to post some questions. I have a simple question please and would appreciate some answers as I am new to Python. I have 2 D array: test = [[A,1],[B,2],[A,3][B,4]] I want to arrang this array in different arrays so each one will have what is attached to. For example I want the output: A =[1,3] and B=[2,4] Build a dict of lists, ie the key is the first member of the sublist and the value is a list of second members of the sublist. You might consider numpy, which is designed for arrays. Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: Teaching Programming
On 03-May-10 09:38 AM, Samuel Williams wrote: Dear Chris, Thanks for reading further into the site. Yes, it is complicated to provide a good comparison. It isn't always accurate and I welcome feedback. Please be aware that orange does not mean problem - it simply means take note that there may be potential issues that you need to consider. It is highly subjective, so I appreciate your feedback. The red dot is when there is definitely an issue that needs to be taken into consideration. It isn't "Okay, Warning, Error" because it isn't possible to make this kind of judgement without being omnipotent. There are several reason why I decided to rate the syntax as not being simple. 1) Indentation model is not appreciated by everyone - I think its a good model, but feedback from some other people has been that they don't like it. Also, I've had perfectly good Python code fall to bits after editing in a different editor. I'm not saying that this was the fault of Python, but in an educational context it might be a problem, since people are fairly limited and don't understand these issues. Nobody likes indentation at first, it is different. There is no begin/end and not {}. That feeling might last for an hour. People welcome the absence of clutter. Indentation makes it easier to read and understand the code. Coding errors are easily found with a good IDE, such as PyScripter Colin W. 2) I don't think that the list comprehension integrates well with the rest of the language. It is an additional syntactic construct which seems to be separate from the rest of the language. It would be nice if list comprehension was implemented in a way that was more general, using a general closure syntax for example. This is just my opinion, and it might not be valid (I don't research this point very heavily). I appreciate that in general the Python syntax is good and concise. It is hard. Some teacher might want to consider these issues more carefully. Do you think I should change that spot to green? I don't have a problem with doing that, as long as it makes sense. Thanks for providing the syntax images, they are very interesting. With regards to Perl, yes, this is probably something I need to investigate further. It is not always easy to do a comparison of this nature. From my experience, Perl generally seems to have a robust object model that is consistently implemented (even if the syntax is pretty wonky at times). However, in a sense, it is no better or worse than Python implementation... so why is it green dot? Do you think I should change Perl to orange or Python to green. The main criteria is whether it is going to be an issue in an educational context - this means, for new programmers, or those who might make error easily (syntax, semantic), etc. Also, I wonder if Visual Basic needs to be reevaluated on this criteria too. I guess what is important is the relative importance. I will bring this issue up on the Perl mailing list in order to get advice. Would you recommend changing Perl to orange? Thanks for your well thought out response, it is very helpful. Kind regards, Samuel On 4/05/2010, at 1:06 AM, Chris Rebert wrote: On Mon, May 3, 2010 at 5:29 AM, Chris Rebert wrote: On Mon, May 3, 2010 at 5:05 AM, Samuel Williams wrote: Dear Friends, I'm looking for some help from the Python community. I hope this is the right place to ask for information. I'm putting together a website aimed at high school students and teachers, and would like to make sure the following page is as good as possible: http://programming.dojo.net.nz/languages/python/index In particular, "Why would I learn this language?" section needs to have a few paragraphs. I don't use Python predominantly so I hoped that you could provide the main reasons why Python is a language someone would want to learn about. - A very clean syntax and elegant design, compared to other languages Also, I take issue with your classifying Python as orange with regard to "Is the general syntax simple and concise?" on http://programming.dojo.net.nz/resources/programming-language-comparison/index Python's syntax is at least as simple, if not simpler, than Ruby's, which you rate as green. Ruby may be /slightly/ more concise than Python in certain cases due to its Perl influences, but those instances of specialized syntax also make it more complex. To wit, I refer you to http://webcache.googleusercontent.com/search?q=cache:dyugd_KlqvcJ:blog.nicksieger.com/articles/2006/10/27/visualization-of-rubys-grammar+ruby+grammar+visualization&cd=1&hl=en&ct=clnk&gl=us Note the complexity of the graph for Ruby's grammar. By comparison, here is the same graph for Python (generated from a file linked to in the post's comment thread): http://rebertia.com/images/python_grammar_graph.png (Disclaimer: Neither of the graphs are current.) Additionally, you rate Python orange but Perl green for "Does the language provide a use
Re: unittest not being run
On 10-May-10 10:21 AM, John Maclean wrote: On 10/05/2010 14:38, J. Cliff Dyer wrote: My guess is you mixed tabs and spaces. One tab is always treated by the python interpreter as being equal to eight spaces, which is two indentation levels in your code. Though if it were exactly as you show it, you'd be getting a syntax error, because even there, it looks like the indentation of your `def test_T1(self):` line is off by one column, relative to pass, and by three columns relative to the other methods. Cheers, Cliff 'twas a spaces/indent issue. thanks! PyScripter and PythonWin permit the user to choose the equivalence of tabs and spaces. I like two spaces = on tab, it's a matter of taste. I feel that eight spaces is too much. Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: How to test whether bit is set within a flag with Python ?
On 12-May-10 14:40 PM, MRAB wrote: robert somerville wrote: I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing how to do it ?? e.g. (in "C") unsigned char a = 6; is 3rd bit set ?? a & 4 =, true in this case 'and', 'or' and 'not' are Boolean. Python borrows its bitwise operators from C: & bitwise and | bitwise or ^ bitwise xor ~ bitwise not (ones' complement) << shift left >> shift right You also need to remember that Python's integers are of (virtually) unlimited length. a= 6 if a & 2: print 'hit' else: print 'miss' This hits. Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Access to comp.lang.python
This isn't about Python but I'm seeking suggestions as to the best way to access the newsgroup. It seems that messages are coming from a number of sources, such as gmane and google groups. The problem is that many messages seem to get unlinked from their threads. I use Thunderbird 3.0.5 and wonder whether the problem lies with the merge process, the server or my reader. Would it be better to go to gmane, google groups or some such provider. In the past, use of Ctrl K had neatly disposed of thread that are of no interest. I would welcome advice. Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: Access to comp.lang.python
On 16-May-10 01:31 AM, James Mills wrote: On Sun, May 16, 2010 at 3:12 PM, Aahz wrote: It's also at least partly due to problems with mail<->news gateways and the differing fields used to maintain threading. Some blame goes on MUAs too :) Thanks for the responses. Is it possible to connect a newsreader to gmane? Or is web access required? Is Thunderbird known to have problems? Colin W -- http://mail.python.org/mailman/listinfo/python-list
Re: Access to comp.lang.python
On 16-May-10 12:47 PM, Jim Byrnes wrote: Grant Edwards wrote: On 2010-05-16, cjw wrote: On 16-May-10 01:31 AM, James Mills wrote: On Sun, May 16, 2010 at 3:12 PM, Aahz wrote: It's also at least partly due to problems with mail<->news gateways and the differing fields used to maintain threading. Some blame goes on MUAs too :) Thanks for the responses. Is it possible to connect a newsreader to gmane? nntp://news.gmane.org/ Could someone please explain how to subscribe to this list on gmane. I subscribe to a couple of other groups there but can't find this one. Regards, Jim With Thunderbird, you need to set up a new account: Tools => AccountSettings => Account Actions => Add another account. => News Group Account => Next From there, it's a matter of filling in the blanks. The news server is "news.gmane.org". I'm just trying it. Colin W, -- http://mail.python.org/mailman/listinfo/python-list
Re: Access to comp.lang.python
On 18-May-10 19:27 PM, Tim Chase wrote: On 05/15/2010 05:34 PM, cjw wrote: It seems that messages are coming from a number of sources, such as gmane and google groups. The problem is that many messages seem to get unlinked from their threads. I use Thunderbird 3.0.5 and wonder whether the problem lies with the merge process, the server or my reader. While others have told you about using gmane or other sources (direct email, etc), I haven't seen anything fly by regarding the "unlinked from their threads" portion of your question. Thunderbird 2.0 -> 3.0 changed the default value for mail.strict_threading from False to True. Pulling up the config editor (essentially the about:config, buried in the options->advanced stuff, I think; or perhaps I have the "about:config" plugin to do that) allows you to toggle this value back to "True". This setting controls whether threads are defined *only* by the mail header (strict=True), or whether TB also tries to guess based on the Subject header (strict=False). Toggle it (and perhaps restart TB?) and see if that helps rectify the threading. There are a lot of folks here on c.l.p that use broken newsreaders that don't correctly set news/threading headers. -tkc Thanks, mine is already set to "true". Colin W. -- http://mail.python.org/mailman/listinfo/python-list
Re: another question about classes and subclassing
On 18-May-10 17:51 PM, Alex Hall wrote: Hi again all, More about classes. I am still looking into my battleship game, and I will have several different craft. All craft have common attribs (position, alive, and so on) but each craft may be a surface ship, submarine, or airplane. All three are craft, but a submarine can be submerged or not, which does not apply to a surface ship or a plane, while a plane can be airborne or not, which is not applicable to the other two. Is there any advantage to creating a craft class: class craft(): #has attribs common to any and all craft #end class then doing something like: class submarine(craft): #sub-specific attribs #end class How would I create a submarine, and then get at the craft-level attribs? Come to think of it, how would I pass anything to the craft constructor (position and alive, for example) when creating a new submarine object? Am I even doing this right to make submarine a subclass of craft? Thanks. Looks OK to me. Colin W. -- http://mail.python.org/mailman/listinfo/python-list