Python 3.4.7 binaries for windows?

2017-08-09 Thread Nagy László Zsolt
Hi! On the official python site, it is possible to download python 3.4.4 here: https://www.python.org/downloads/release/python-344/ There are binary installation files for Windows. But Python 3.4.4 is two years old. There is 3.4.7 that was just released, but there are no binaries. https://www.

[SOLVED] Re: Firebird 1.5 and Python 3.4 - is this possible?

2017-08-09 Thread Nagy László Zsolt
To answer my own question: - You can convert a firebird 1.5 database into 2.5 with this tool: http://gsbelarus.com/gs/fdbconvert/fdbconvert_eng.html - You can install firebird 2.5 instead of 1.5. Old BDE based program will still work with it, because the Firebird 2.5 server can talk with a 1.5 c

Re: Validating regexp

2017-08-09 Thread Cameron Simpson
On 09Aug2017 10:46, Jon Ribbens wrote: On 2017-08-09, Cameron Simpson wrote: On 08Aug2017 17:31, Jon Ribbens wrote: ... but bear in mind, there have been ways of doing denial-of-service attacks with valid-but-nasty regexps in the past, and I wouldn't want to rely on there not being any now.

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Ethan Furman
On 08/09/2017 03:39 PM, Ian Kelly wrote: On Wed, Aug 9, 2017 at 2:20 PM, Ethan Furman wrote: On 08/09/2017 12:59 PM, Ian Pilcher wrote: I do want to prevent frozenset.__init__ from being called *again* when an existing instance is returned, so I've decided to take this approach: def __

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Ian Kelly
On Aug 9, 2017 4:39 PM, "Ian Kelly" wrote: By the way, "whom" is not the verb object in "Whom do you think is going to call", so it should properly be "who do you think is going to call". I point this out because although I don't really care when people use "who" incorrectly, it looks pretty si

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Ian Kelly
On Wed, Aug 9, 2017 at 2:20 PM, Ethan Furman wrote: > On 08/09/2017 12:59 PM, Ian Pilcher wrote: > >> I do want to prevent frozenset.__init__ from being called *again* when >> an existing instance is returned, so I've decided to take this >> approach: >> >> def __new__(cls, *args, **kwargs):

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Ethan Furman
On 08/09/2017 12:59 PM, Ian Pilcher wrote: I do want to prevent frozenset.__init__ from being called *again* when an existing instance is returned, so I've decided to take this approach: def __new__(cls, *args, **kwargs): self = super(UniqueSet, cls).__new__(cls, *args, **kwargs)

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Ian Pilcher
On 08/09/2017 07:54 AM, Steve D'Aprano wrote: On Wed, 9 Aug 2017 10:08 am, Ian Pilcher wrote: I have created a class to provide a "hash consing"[1] set. Your footnote for [1] appears to be missing. What's a hash consing set? It appears to be nothing more than frozen sets which you put in a ca

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Ian Pilcher
On 08/08/2017 10:19 PM, Ian Kelly wrote: It's initialized by the superclass call to __new__. frozenset is immutable, and __init__ methods of immutable types generally don't do anything (if they could, then they wouldn't be immutable), which is why it doesn't really matter that you didn't call it.

Re: Planning a Python Course for Beginners

2017-08-09 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Aug 9, 2017 at 11:46 PM, Marko Rauhamaa wrote: >> Really, the most obvious use case for hashed objects is their membership >> in a set. For example: >> >> invitees = set(self.bff) >> invitees |= self.classmates() >> invitees |= self.relatives() > > Okay. So

Re: Planning a Python Course for Beginners

2017-08-09 Thread Steve D'Aprano
On Wed, 9 Aug 2017 11:46 pm, Marko Rauhamaa wrote: > Typically, an object's equality is simply the "is" relation. "Typically"? I don't think so. Are you sure you've programmed in Python before? *wink* py> [1, 2] is [1, 2] False The most commonly used objects don't define equality as identity, e

Re: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Chris Warrick
On 9 August 2017 at 17:14, Steve D'Aprano wrote: > On Wed, 9 Aug 2017 07:12 pm, Chris Warrick wrote: > >> So, I started by writing my opinion of those recommendations, and that >> the “community” is very small (<1k Twitter followers, 2.7k Facebook >> likes). But then I went to the “About Us” page,

Re: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Chris Angelico
On Thu, Aug 10, 2017 at 1:14 AM, Steve D'Aprano wrote: > On Wed, 9 Aug 2017 07:12 pm, Chris Warrick wrote: > >> So, I started by writing my opinion of those recommendations, and that >> the “community” is very small (<1k Twitter followers, 2.7k Facebook >> likes). But then I went to the “About Us”

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Steve D'Aprano
On Thu, 10 Aug 2017 12:39 am, Dennis Lee Bieber wrote: > On Wed, 09 Aug 2017 22:54:00 +1000, Steve D'Aprano > declaimed the following: > >>Its not just frozenset. Any mutable class must initialise its instances in >>__new__. Immutable classes can use either __new__ or __init__, but for >>histori

Re: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Steve D'Aprano
On Wed, 9 Aug 2017 07:12 pm, Chris Warrick wrote: > So, I started by writing my opinion of those recommendations, and that > the “community” is very small (<1k Twitter followers, 2.7k Facebook > likes). But then I went to the “About Us” page, and found your name > and your profile picture there. N

Re: Planning a Python Course for Beginners

2017-08-09 Thread Chris Angelico
On Wed, Aug 9, 2017 at 11:46 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Wed, Aug 9, 2017 at 10:00 PM, Marko Rauhamaa wrote: >>> Chris Angelico : >>> Which means that its value won't change. That's what I said. Two things will be equal regardless of that metadata. >>> >>> In re

Re: Planning a Python Course for Beginners

2017-08-09 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Aug 9, 2017 at 10:00 PM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> Which means that its value won't change. That's what I said. Two >>> things will be equal regardless of that metadata. >> >> In relational-database terms, your "value" is the primary key and >> yo

Re: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Grant Edwards
On 2017-08-09, Chris Warrick wrote: > On 9 August 2017 at 10:29, Saurabh Hooda wrote: >> Hello, >> [advertisement] > So, I started by writing my opinion of those recommendations, and that > the “community” is very small (<1k Twitter followers, 2.7k Facebook > likes). But then I went to the “Abou

Re: Planning a Python Course for Beginners

2017-08-09 Thread Verde Denim
On 8/9/2017 9:25 AM, Marko Rauhamaa wrote: > r...@zedat.fu-berlin.de (Stefan Ram): > >> Steve D'Aprano writes: >>> There's a word for frozen list: "tuple". >> Yes, but one should not forget that a tuple >> can contain mutable entries (such as lists). > Not when used as keys: > > >>> hash

Re: Planning a Python Course for Beginners

2017-08-09 Thread Marko Rauhamaa
r...@zedat.fu-berlin.de (Stefan Ram): > Steve D'Aprano writes: >>There's a word for frozen list: "tuple". > > Yes, but one should not forget that a tuple > can contain mutable entries (such as lists). Not when used as keys: >>> hash(([], [])) Traceback (most recent call last):

Re: Planning a Python Course for Beginners

2017-08-09 Thread Chris Angelico
On Wed, Aug 9, 2017 at 10:00 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> Which means that its value won't change. That's what I said. Two >> things will be equal regardless of that metadata. > > In relational-database terms, your "value" is the primary key and your > "metadata" is the rest o

Re: Planning a Python Course for Beginners

2017-08-09 Thread Steve D'Aprano
On Wed, 9 Aug 2017 08:38 pm, Marko Rauhamaa wrote: > sometimes you really would like an immutable > (or rather, no-longer-mutable) list to act as a key. There's a word for frozen list: "tuple". :-) -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, thi

Re: Planning a Python Course for Beginners

2017-08-09 Thread Steve D'Aprano
On Wed, 9 Aug 2017 02:19 pm, Dennis Lee Bieber wrote: > On Tue, 8 Aug 2017 15:38:42 + (UTC), Grant Edwards > declaimed the following: > >>On 2017-08-08, Peter Heitzer wrote: [...] >>> The differences between blanks and tabs :-) >> >>You've misspelled "Tabs are evil and should never be used"

Re: Planning a Python Course for Beginners

2017-08-09 Thread Steve D'Aprano
On Wed, 9 Aug 2017 07:51 pm, Marko Rauhamaa wrote: > Dennis Lee Bieber : > >> Then there is the facet that tuples (being unmutable) can be used as >> keys into a dictionary... > > Mutable objects can be used as keys into a dictionary. Indeed. And people can also put their hand into a fire in o

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Steve D'Aprano
On Wed, 9 Aug 2017 10:08 am, Ian Pilcher wrote: > I have created a class to provide a "hash consing"[1] set. Your footnote for [1] appears to be missing. What's a hash consing set? It appears to be nothing more than frozen sets which you put in a cache so as to confuse identity and value *wink*

Re: Validating regexp

2017-08-09 Thread Larry Martell
On Wed, Aug 9, 2017 at 6:13 AM, Peter Heitzer wrote: > Larry Martell wrote: >>On Tue, Aug 8, 2017 at 12:51 PM, Chris Angelico wrote: >>> On Wed, Aug 9, 2017 at 2:37 AM, Larry Martell >>> wrote: Anyone have any code or know of any packages for validating a regexp? I have an app t

Re: Planning a Python Course for Beginners

2017-08-09 Thread Larry Martell
On Wed, Aug 9, 2017 at 8:00 AM, Marko Rauhamaa wrote: > Yeah, when there's a will, there's a way. My Dad used to say "Where there's a will, there's relatives." -- https://mail.python.org/mailman/listinfo/python-list

RE: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread learning
Hi Saurabh, those are good for ones to become proficient in writing Python Code. Regards, Sriram Srinivasan www.sriramsrinivasan.in -Original Message- From: Python-list [mailto:python-list-bounces+learning=sriramsrinivasan...@python.org] On Behalf Of Saurabh Hooda Sent: 09 August 2017 13

Re: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Chris Warrick
On 9 August 2017 at 10:29, Saurabh Hooda wrote: > Hello, > [advertisement] proclaims that it's a collection of the best tutorials > recommended by the programming community. Do you agree? Is there any better > tutorial? > > Thanks in advance, > Saurabh Hooda > -- > https://mail.python.org/mailma

Re: Planning a Python Course for Beginners

2017-08-09 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Aug 9, 2017 at 8:38 PM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> On Wed, Aug 9, 2017 at 7:51 PM, Marko Rauhamaa wrote: Mutable objects can be used as keys into a dictionary. >>> >>> Only when the objects' mutability does not affect their values. >> >> Up t

Re: Validating regexp

2017-08-09 Thread TheSeeker
On Tuesday, August 8, 2017 at 11:38:34 AM UTC-5, larry@gmail.com wrote: > Anyone have any code or know of any packages for validating a regexp? > > I have an app that allows users to enter regexps for db searching. > When a user enters an invalid one (e.g. 'A|B|' is one I just saw) it > causes

Re: Planning a Python Course for Beginners

2017-08-09 Thread Chris Angelico
On Wed, Aug 9, 2017 at 8:38 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Wed, Aug 9, 2017 at 7:51 PM, Marko Rauhamaa wrote: >>> Mutable objects can be used as keys into a dictionary. >> >> Only when the objects' mutability does not affect their values. > > Up to equality. The objects can

Re: Validating regexp

2017-08-09 Thread Jon Ribbens
On 2017-08-09, Cameron Simpson wrote: > On 08Aug2017 17:31, Jon Ribbens wrote: >>On 2017-08-08, Chris Angelico wrote: >>> On Wed, Aug 9, 2017 at 2:57 AM, Larry Martell >>> wrote: Yeah, it does not throw for 'A|B|' - but mysql chokes on it with empty subexpression for regexp' I'd like

Re: Planning a Python Course for Beginners

2017-08-09 Thread alister via Python-list
On Tue, 08 Aug 2017 14:19:53 +, Stefan Ram wrote: > I am planning a Python course. > > I started by writing the course akin to courses I gave in other > languages, that means, the course starts roughly with these topics: > > - number and string literals - types of number and string liter

Re: Planning a Python Course for Beginners

2017-08-09 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Aug 9, 2017 at 7:51 PM, Marko Rauhamaa wrote: >> Mutable objects can be used as keys into a dictionary. > > Only when the objects' mutability does not affect their values. Up to equality. The objects can carry all kinds of mutable payload as long as __hash__() and __eq

Re: Validating regexp

2017-08-09 Thread Peter Heitzer
Larry Martell wrote: >On Tue, Aug 8, 2017 at 12:51 PM, Chris Angelico wrote: >> On Wed, Aug 9, 2017 at 2:37 AM, Larry Martell >> wrote: >>> Anyone have any code or know of any packages for validating a regexp? >>> >>> I have an app that allows users to enter regexps for db searching. >>> When a

Re: Planning a Python Course for Beginners

2017-08-09 Thread Chris Angelico
On Wed, Aug 9, 2017 at 7:51 PM, Marko Rauhamaa wrote: > Dennis Lee Bieber : > >> Then there is the facet that tuples (being unmutable) can be used as >> keys into a dictionary... > > Mutable objects can be used as keys into a dictionary. Only when the objects' mutability does not affect the

Re: Planning a Python Course for Beginners

2017-08-09 Thread Marko Rauhamaa
Dennis Lee Bieber : > Then there is the facet that tuples (being unmutable) can be used as > keys into a dictionary... Mutable objects can be used as keys into a dictionary. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Planning a Python Course for Beginners

2017-08-09 Thread Marko Rauhamaa
Dennis Lee Bieber : > Tabs are logical entities indicating structure and should always be > used! I wrote an entire database program using only tabs. http://dilbert.com/strip/1992-09-08> Marko -- https://mail.python.org/mailman/listinfo/python-list

[Repost] Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Saurabh Hooda
Hello, I am the co-founder of Hackr.io, a community where developers can share and recommend the tutorials they have found useful. This is the page for Python tutorials: https://hackr.io/tutorials/learn-python I am interested in listening to your feedback on how we can improve Hackr.io Python t

Re: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Ben Finney
Saurabh Hooda writes: > https://hackr.io/tutorials/learn-python proclaims that it's a > collection of the best tutorials recommended by the programming > community. Do you agree? I agree that those are recommended by the programming community. Do I agree those are the best? I don't have a good

Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Saurabh Hooda
Hello, https://hackr.io/tutorials/learn-python proclaims that it's a collection of the best tutorials recommended by the programming community. Do you agree? Is there any better tutorial? Thanks in advance, Saurabh Hooda -- https://mail.python.org/mailman/listinfo/python-list

Re: __new__ and __init__ - why does this work?

2017-08-09 Thread Peter Otten
Ian Pilcher wrote: > I have created a class to provide a "hash consing"[1] set. > >class UniqueSet(frozenset): > >_registry = dict() > >def __new__(cls, *args, **kwargs): >set = frozenset(*args, **kwargs) >try: >return UniqueSet._regis

[RELEASED] Python 3.4.7 is now available

2017-08-09 Thread Larry Hastings
On behalf of the Python development community and the Python 3.4 release team, I'm pleased to announce the availability of Python 3.4.7. Python 3.4 is now in "security fixes only" mode. This is the final stage of support for Python 3.4. Python 3.4 now only receives security fixes, not bug