On Sun, Aug 3, 2014 at 3:20 PM, Steve Hayes wrote:
> On Sun, 3 Aug 2014 15:12:02 +1000, Chris Angelico wrote:
>
>>On Sun, Aug 3, 2014 at 3:11 PM, Steve Hayes wrote:
You're looking at a Python 2 book, and you're running Python 3. I
would recommend instead getting a Python 3 tutorial:
>>>
On 08/02/2014 10:20 PM, Steve Hayes wrote:
there are no books available on Python 3 (I don't regard downloadable PDFs
> or other onlines stuff as "books").
That's a very broad... and very *wrong* statement.
--
Shiny! Let's be bad guys.
Reach me @ memilanuk (at) gmail dot com
--
https://ma
On Sun, 3 Aug 2014 15:12:02 +1000, Chris Angelico wrote:
>On Sun, Aug 3, 2014 at 3:11 PM, Steve Hayes wrote:
>>>You're looking at a Python 2 book, and you're running Python 3. I
>>>would recommend instead getting a Python 3 tutorial:
>>
>> Or do as I did, and install Python 2.
>
>Better to insta
On Sun, Aug 3, 2014 at 3:11 PM, Steve Hayes wrote:
>>You're looking at a Python 2 book, and you're running Python 3. I
>>would recommend instead getting a Python 3 tutorial:
>
> Or do as I did, and install Python 2.
Better to install and learn Python 3. Much better.
ChrisA
--
https://mail.pytho
On Sun, 3 Aug 2014 08:30:15 +1000, Chris Angelico wrote:
>On Sun, Aug 3, 2014 at 8:13 AM, Seymore4Head
> wrote:
>> https://www.google.com/webhp?hl=en&tab=ww&gws_rd=ssl#hl=en&q=python+programing+for+the+absolute+beginner
>>
>> There is a book listed as a PDF.
>>
>> When I try the first example of
On 8/2/2014 10:16 PM, Terry Reedy wrote:
On 8/2/2014 6:53 PM, Nicholas Cannon wrote:
The only way i can make the buttons look neat and then when i keep
pressing one the label gets larger and then half the buttons
move out of the screen
With my code below, I tried entering a 20 digit number
On 8/2/2014 8:59 PM, Ian Kelly wrote:
On Sat, Aug 2, 2014 at 2:46 PM, Mark Summerfield wrote:
On Saturday, 2 August 2014 20:58:59 UTC+1, Ben Finney wrote:
Steven D'Aprano writes:
If you need instances which carry state, then object is the wrong
class.
Fair enough.
Right. The 'types' mod
On 8/2/2014 5:16 PM, Mark Lawrence wrote:
On 02/08/2014 22:05, Chris Angelico wrote:
On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield
wrote:
But perhaps what I should be asking for is for a new built-in that
does what types.SimpleNamespace() does, so that without any import
you can write, say,
On Saturday, August 2, 2014 10:38:28 PM UTC+8, Nicholas Cannon wrote:
> So i have a basic calculator program and i have a label that i want to go
> across the top to show the numbers and stuff like on a normal calculator. The
> only way i can make the buttons look neat and then when i keep pressi
On Saturday, August 2, 2014 5:53:12 PM UTC-5, Nicholas Cannon wrote:
> So i have a basic calculator program and i
> have a label that i want to go across the top to show the
> numbers and stuff like on a normal calculator. The only
> way i can make the buttons look neat and then when i keep
> press
On 8/2/2014 6:53 PM, Nicholas Cannon wrote:
On Saturday, August 2, 2014 10:38:28 PM UTC+8, Nicholas Cannon wrote:
So i have a basic calculator program and i have a label that i want to go across
>> the top to show the numbers and stuff like on a normal calculator.
The buttons are labelled alre
On Sun, Aug 3, 2014 at 10:01 AM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>>
>> It's a little awkward when you have
>> an invoicing screen and you put something like "P&O Shipping" as your
>> customer name, and suddenly Alt-O takes you someplace different.
>
>
> An app that did that would be s
On Sat, Aug 2, 2014 at 2:46 PM, Mark Summerfield wrote:
> On Saturday, 2 August 2014 20:58:59 UTC+1, Ben Finney wrote:
>> Steven D'Aprano writes:
>>
>> > If you need instances which carry state, then object is the wrong
>> > class.
>
> Fair enough.
>
>> Right. The 'types' module provides a Simple
Roy Smith wrote:
These days, I'm running multiple 24 inch monitors. The single menu bar
paradigm starts to break down in an environment like that.
Yes, that's an issue. However, even on a large screen, most of
my windows are at least half a screen high, putting their tops
a considerable distan
MRAB wrote:
RISC OS didn't have a menu bar at the top of each window either; its
menus were all pop-up. You didn't have to keep flicking the mouse at
all!
The main reason for having a menu bar is discoverability. The
idea is that you can browse through the menus and get a feel
for what commands
Chris Angelico wrote:
It's a little awkward when you have
an invoicing screen and you put something like "P&O Shipping" as your
customer name, and suddenly Alt-O takes you someplace different.
An app that did that would be seriously broken, wouldn't it?
The & should only be interpreted that way
On Sun, Aug 3, 2014 at 9:04 AM, Demian Brecht wrote:
> For gits looking to transition to hg (namely to work on cpython):
> http://demianbrecht.github.io/vcs/2014/07/31/from-git-to-hg/.
>
> My learnings beginning to work with mercurial while working on the stdlib.
>
> (This was sent out to core-men
On Sun, Aug 3, 2014 at 9:18 AM, Devin Jeanpierre wrote:
> On Sat, Aug 2, 2014 at 2:05 PM, Chris Angelico wrote:
>> On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield wrote:
>>> Naturally, I understand that adding a new name is a big deal and may be too
>>> much to ask for beginners.
>>
>> This is
On 8/2/2014 4:03 AM, Mark Summerfield wrote:
On Saturday, 2 August 2014 08:46:04 UTC+1, Mark Lawrence wrote:
On 02/08/2014 07:45, Mark Summerfield wrote:
Summarizing my responses on the tracker...
Suggestion #1: Make IDLE start in the user's home directory.
Entirely agree. Please raise a
On Sat, Aug 2, 2014 at 2:05 PM, Chris Angelico wrote:
> On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield wrote:
>> Naturally, I understand that adding a new name is a big deal and may be too
>> much to ask for beginners.
>
> This is where you might want to consider putting some imports into
> si
For gits looking to transition to hg (namely to work on cpython):
http://demianbrecht.github.io/vcs/2014/07/31/from-git-to-hg/.
My learnings beginning to work with mercurial while working on the stdlib.
(This was sent out to core-mentorship already, just figured this is
likely a larger audience w
On 8/2/2014 3:46 AM, Mark Lawrence wrote:
On 02/08/2014 07:45, Mark Summerfield wrote:
Last week I spent a couple of days teaching two children (10 and 13 --
too big an age gap!) how to do some turtle graphics with Python.
Neither had programmed Python before -- one is a Minecraft ace and the
ot
On Sun, Aug 3, 2014 at 8:41 AM, Seymore4Head
wrote:
>>If the book is for Python 2 and you have 3.3 it should be print("Game Over")
>
> Thanks
>
> I am sure they had a good reason to add using 2 more characters for
> doing the same job.
One more, since you'll normally have a space after the word "
On Saturday, August 2, 2014 10:38:28 PM UTC+8, Nicholas Cannon wrote:
> So i have a basic calculator program and i have a label that i want to go
> across the top to show the numbers and stuff like on a normal calculator. The
> only way i can make the buttons look neat and then when i keep pressi
On Sun, 3 Aug 2014 08:30:15 +1000, Chris Angelico
wrote:
>On Sun, Aug 3, 2014 at 8:13 AM, Seymore4Head
> wrote:
>> https://www.google.com/webhp?hl=en&tab=ww&gws_rd=ssl#hl=en&q=python+programing+for+the+absolute+beginner
>>
>> There is a book listed as a PDF.
>>
>> When I try the first example of
On Sat, 02 Aug 2014 23:31:35 +0100, Mark Lawrence
wrote:
>On 02/08/2014 23:13, Seymore4Head wrote:
>> https://www.google.com/webhp?hl=en&tab=ww&gws_rd=ssl#hl=en&q=python+programing+for+the+absolute+beginner
>>
>> There is a book listed as a PDF.
>>
>> When I try the first example of print "Game O
On 02/08/2014 23:13, Seymore4Head wrote:
https://www.google.com/webhp?hl=en&tab=ww&gws_rd=ssl#hl=en&q=python+programing+for+the+absolute+beginner
There is a book listed as a PDF.
When I try the first example of print "Game Over" I get a syntax
error.
I have tried running the command line and t
On Sun, Aug 3, 2014 at 8:13 AM, Seymore4Head
wrote:
> https://www.google.com/webhp?hl=en&tab=ww&gws_rd=ssl#hl=en&q=python+programing+for+the+absolute+beginner
>
> There is a book listed as a PDF.
>
> When I try the first example of print "Game Over" I get a syntax
> error.
>
> I have tried running
https://www.google.com/webhp?hl=en&tab=ww&gws_rd=ssl#hl=en&q=python+programing+for+the+absolute+beginner
There is a book listed as a PDF.
When I try the first example of print "Game Over" I get a syntax
error.
I have tried running the command line and the GUI. I get the feeling
there is somethi
On 02/08/2014 22:16, Mark Lawrence wrote:
On 02/08/2014 22:05, Chris Angelico wrote:
On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield
wrote:
But perhaps what I should be asking for is for a new built-in that
does what types.SimpleNamespace() does, so that without any import
you can write, say,
On Sun, Aug 3, 2014 at 7:16 AM, Mark Lawrence wrote:
> I'd forgotten all about site.py so went to the 3.4.1 docs and found
> "Deprecated since version 3.4: Support for the “site-python” directory will
> be removed in 3.5.".
>
> Plan B? :)
Oh. Hrm. I've no idea... but I'm sure there'll be a way to
On 02/08/2014 22:13, jonnicol...@googlemail.com wrote:
On Friday, 1 August 2014 16:41:41 UTC+1, Steven D'Aprano wrote:
On Fri, 01 Aug 2014 14:39:09 +0100, Robert Kern wrote:
Take a look at what has already been implemented in IPython:
https://github.com/ipython/ipython/blob/master/IP
On 02/08/2014 22:05, Chris Angelico wrote:
On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield wrote:
But perhaps what I should be asking for is for a new built-in that does what
types.SimpleNamespace() does, so that without any import you can write, say,
foo = namespace(a=1, b=2)
# or
bar = nam
On Friday, 1 August 2014 16:41:41 UTC+1, Steven D'Aprano wrote:
> On Fri, 01 Aug 2014 14:39:09 +0100, Robert Kern wrote:
>
>
>
> > Take a look at what has already been implemented in IPython:
>
> >
>
> > https://github.com/ipython/ipython/blob/master/IPython/core/
>
> completerlib.py#L208
>
On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield wrote:
> But perhaps what I should be asking for is for a new built-in that does what
> types.SimpleNamespace() does, so that without any import you can write, say,
>
> foo = namespace(a=1, b=2)
> # or
> bar = namespace()
> bar.a = 1
>
> where unde
On Saturday, 2 August 2014 20:58:59 UTC+1, Ben Finney wrote:
> Steven D'Aprano writes:
>
> > If you need instances which carry state, then object is the wrong
> > class.
Fair enough.
> Right. The 'types' module provides a SimpleNamespace class for the
> common "bag of attributes" use case::
>
Steven D'Aprano writes:
> If you need instances which carry state, then object is the wrong
> class.
Right. The ‘types’ module provides a SimpleNamespace class for the
common “bag of attributes” use case::
>>> import types
>>> foo = types.SimpleNamespace()
>>> foo.x = 3
>>> foo
Mark Lawrence :
> On 02/08/2014 18:07, Marko Rauhamaa wrote:
>> And the newest Python releases let you replace that with:
>>
>> import types
>> Object = types.SimpleNamespace
>
> With the latter being part of suggestion #3 in the original post.
Not quite. Even though Sugg. #3 would allow
On 8/2/2014 8:13 AM, Robert Kern wrote:
On 2014-08-02 09:33, Heinz Schmitz wrote:
Akira Li wrote:
Look at how `help('modules')` is implemented. Though it crashes on my
system.
Have you reported this at bugs.python.org or is there already an issue
for the problem that you see?
It is this
On 02/08/2014 18:07, Marko Rauhamaa wrote:
Steven D'Aprano :
Marko Rauhamaa wrote:
__setattr__ could create __dict__ belatedly.
Are we designing Son Of PHP, or a sensible language? *wink*
If object.__setattr__ did this, then we're left with two equally
horrible choices:
Not a huge issue.
Steven D'Aprano :
> Marko Rauhamaa wrote:
>> __setattr__ could create __dict__ belatedly.
>
> Are we designing Son Of PHP, or a sensible language? *wink*
>
> If object.__setattr__ did this, then we're left with two equally
> horrible choices:
Not a huge issue. Only mildly annoying to have to crea
On 02/08/2014 15:38, Nicholas Cannon wrote:
So i have a basic calculator program and i have a label that i want to go
across the top to show the numbers and stuff like on a normal calculator. The
only way i can make the buttons look neat and then when i keep pressing one the
label gets larger
Marko Rauhamaa wrote:
> Mark Summerfield :
>
>> object() returns a minimal featureless object with no dictionary (no
>> __dict__ attribute). This makes sense for efficiency since not all
>> objects need a dictionary.
>
> __setattr__ could create __dict__ belatedly.
Are we designing Son Of PHP,
Marko Rauhamaa wrote:
> Expanding #3:
>
>>>> o = object()
>>>> o.x = 3
>Traceback (most recent call last):
> File "", line 1, in
>AttributeError: 'object' object has no attribute 'x'
>
> Why?
There are two intended uses for object and its instances:
- as the base class fo
On 2014-08-02 15:38, Nicholas Cannon wrote:
So i have a basic calculator program and i have a label that i want
to go across the top to show the numbers and stuff like on a normal
calculator. The only way i can make the buttons look neat and then
when i keep pressing one the label gets larger and
So i have a basic calculator program and i have a label that i want to go
across the top to show the numbers and stuff like on a normal calculator. The
only way i can make the buttons look neat and then when i keep pressing one the
label gets larger and then half the buttons move out of the scre
In article ,
Gregory Ewing wrote:
> > And don't mention the menu bar across the top, separated from the
> > window to which it belonged.
>
> That seems to be a matter of taste. There are some
> advantages to the menu-bar-at-top model. It's an easier
> target to hit, because you can just flick t
On 2014-08-02 01:00, Gregory Ewing wrote:
MRAB wrote:
[snip]
And don't mention the menu bar across the top, separated from the
window to which it belonged.
That seems to be a matter of taste. There are some advantages to the
menu-bar-at-top model. It's an easier target to hit, because you can
On Sat, Aug 2, 2014 at 9:33 PM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>>
>> The "easier target for the mouse" argument is valuable ONLY
>> when you use the mouse to access the menu bar. If you use the keyboard
>> (and take advantage of mnemonic letters), it's much more useful to
>> have the
On 2014-08-02 09:33, Heinz Schmitz wrote:
Akira Li wrote:
Look at how `help('modules')` is implemented. Though it crashes on my
system.
Have you reported this at bugs.python.org or is there already an issue
for the problem that you see?
It is this issue for python2.7:
https://bugs.launchp
On 8/1/14 10:30 AM, Ian Kelly wrote:
On Thu, Jul 31, 2014 at 9:28 PM, Terry Reedy wrote:
On 7/31/2014 5:15 PM, Ian Kelly wrote:
On Thu, Jul 31, 2014 at 5:24 AM, Dilu Sasidharan
wrote:
Hi,
I am wondering why the dictionary in python not returning multi value key
error when i define somethi
Olaf Hering wrote:
How does "a package" differ? Its "a package" here and there.
Just use the correct tools to inspect "a package", like
'rpm -qliv $package' to see what "a package" is all about.
Splitting the package up creates a problem, which you
then need to invent a special tool to solve. S
Chris Angelico wrote:
The "easier target for the mouse" argument is valuable ONLY
when you use the mouse to access the menu bar. If you use the keyboard
(and take advantage of mnemonic letters), it's much more useful to
have the menu bar attached to its window.
Seems to me that if you use the k
On Sat, Aug 2, 2014 at 4:41 PM, Marko Rauhamaa wrote:
> I don't know why you way hg and git have no threat models. A great deal
> of damage could be inflicted if you could sneak malicious edits into
> version control systems without altering the hash.
You would have to somehow push that change in
Akira Li wrote:
>>> Look at how `help('modules')` is implemented. Though it crashes on my
>>> system.
>> Have you reported this at bugs.python.org or is there already an issue
>> for the problem that you see?
>It is this issue for python2.7:
>https://bugs.launchpad.net/ubuntu/+source/python2.7/+
On Saturday, 2 August 2014 08:46:04 UTC+1, Mark Lawrence wrote:
> On 02/08/2014 07:45, Mark Summerfield wrote:
>
[snip]
>
> > Suggestion #1: Make IDLE start in the user's home directory.
>
> Entirely agree. Please raise an enhancement request on the bug tracker
> if there isn't already one.
Mark Summerfield :
> object() returns a minimal featureless object with no dictionary (no
> __dict__ attribute). This makes sense for efficiency since not all
> objects need a dictionary.
__setattr__ could create __dict__ belatedly.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On 02/08/2014 03:59, Steven D'Aprano wrote:
My refactoring, with the bare minimum use of exec necessary:
https://code.activestate.com/recipes/578918-yet-another-namedtuple/
FTR I get the feed of new recipes from
gwene.com.activestate.code.feeds.recipes.langs.python from news.gmane.org.
--
On 02/08/2014 07:45, Mark Summerfield wrote:
Last week I spent a couple of days teaching two children (10 and 13 -- too big
an age gap!) how to do some turtle graphics with Python. Neither had programmed
Python before -- one is a Minecraft ace and the other had done Scratch.
Suggestion #1: Mak
Steven D'Aprano wrote:
> On Fri, 01 Aug 2014 17:44:27 +0200, Peter Otten wrote:
> [...]
>>> bool = ((df['a'] == 1) & (df['A'] == 0) |
>>> (df['b'] == 1) & (df['B'] == 0) |
>>> (df['c'] == 1) & (df['C'] == 0))
>>
>> This is how it might look without eval():
>>
>> #untested
>> r
On Saturday, 2 August 2014 08:14:08 UTC+1, Marko Rauhamaa wrote:
> Mark Summerfield:
>
> > Suggestion #1: Make IDLE start in the user's home directory.
>
> > Suggestion #2: Make all the turtle examples begin "from turtle import
> > *" so no leading turtle. is needed in the examples.
> >
> > Sugge
On Sat, Aug 02, Gregory Ewing wrote:
> MacOSX doesn't currently have an automatic dependency
> manager, but if it did, things would still be a lot neater
> and tidier than they are in Linux or Windows, where what
> is conceptually a single object (a package) gets split up
> and its parts scattered
Mark Summerfield :
> Suggestion #1: Make IDLE start in the user's home directory.
>
> Suggestion #2: Make all the turtle examples begin "from turtle import
> *" so no leading turtle. is needed in the examples.
>
> Suggestion #3: Make object(key=value, ...) legal and equiv of
> types.SimpleNamespac
Marko Rauhamaa :
> Important systems absolutely rely on the fact that the hashes can be
> used for identification. They are not just checksums. They are not
> double-checked with bit-to-bit comparisons of the actual data.
And in fact, you can use the principle in Python:
class Thingy:
64 matches
Mail list logo