Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: psss...I want to move from Perl to Python Date: Fri, 29 Jan 2016 11:25:24 +1100 Lines: 44 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de DN5YEc+uknrXdFM4u7pVkQV1ISm09tBd4CM3+4AvC9bA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.075 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'subject:Python': 0.05; 'assignment': 0.07; 'cc:addr:python-list': 0.09; 'advice.': 0.09; 'script,': 0.09; 'python': 0.10; 'jan': 0.11; '2.7': 0.13; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'python?': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'saying': 0.22; '3.x': 0.22; 'am,': 0.23; 'for?': 0.23; 'header :In-Reply-To:1': 0.24; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'cool': 0.27; 'idea': 0.28; 'regular': 0.29; 'perl': 0.29; 'objects': 0.29; 'tutorial': 0.29; 'work.': 0.30; 'code': 0.30; 'probably': 0.31; 'post': 0.31; 'received:google.com': 0.35; 'could': 0.35; 'library.': 0.35; 'subject:': 0.35; 'but': 0.36; 'too': 0.36; 'should': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'modules': 0.36; 'projects.': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'list.': 0.37; 'things': 0.38; 'doing': 0.38; 'version': 0.38; 'received:209': 0.38; 'names': 0.38; 'stuff': 0.38; 'anything': 0.38; 'thank': 0.38; 'does': 0.39; 'subject:from': 0.39; 'where': 0.40; 'your': 0.60; "you'll": 0.61; 'different': 0.63; 'to,': 0.63; 'you.': 0.64; 'afraid': 0.67; 'biggest': 0.67; 'experts': 0.70; 'reviewed': 0.72; 'friendly': 0.74; '"hey,': 0.84; '2.7.': 0.84; 'chrisa': 0.84; 'of?': 0.84; 'personally.': 0.84; 'welcome!': 0.84; 'to:none': 0.91; 'tricks.': 0.91; 'yes!': 0.91; 'subject:want': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=Aql5W8Om0K6sWi/UpAemviLd0/QHBqpO5LXYCnVgTlk=; b=BRtULLjgM8a5DoPCOdrnfe8x0xqDf0aWCpeFK8kBHYUKRzbDKBFtAPAJ+Plpqu5dFL yNbMskF7u4XHHuAfKuiNmp5y1lahsESDQePMpd7faUxeo9w/eu7VsnTmgJRX+A0MjZtu 0HphyXqS4cZjK9HeIErVFrjr5fl3c0RhQN+1qTVzaahPghYNg+8XPS5vvgEVS6GxAKLu Xby5zEBjOeWDo1palrEP+Wl/B/oZ3I5yxNof2zUTuYDh1Vhd/ZrBj6VScErBLlRug8fb AKoKok9Tb+ih+U7VojgHP2ZHHYjas7kpLeL9n3BZYrxFfUpwl2Pra7K9B07QkN6vabqM Y7AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=Aql5W8Om0K6sWi/UpAemviLd0/QHBqpO5LXYCnVgTlk=; b=cxdbSB7ec2nccIS8GoLOZpB+/992P5zbXXdwz5udBQL+E4rQHGgsz6U34cl8e6PWFh baE8SeU9VZeOzgSpP9gWBfXhg5fspL1gTgTme9N4VH+jniLGtHqF3gVAOzdtT670NQTc sxm+msMXCbwAKVA2QQBgY+F3eaNFT0nOMpH+uzfYdc2BhxGeblVanHNJkyy/sTCEu/nE UQ5WrbUCYWP1we/91kUllVovFltLSx5hgI5D5U6QjX4kv06mQlaPaKV0KBV35Q3PX7AL 8cdU+/x1L6u1CCV4kYyY7ANF7/pw+OeRC3jwmqse2aE7awiWwh7os3DIOhQYr0pml27L +YSQ== X-Gm-Message-State: AG10YOTgv1BjLWdF6yhU9dVqxkt0Ts+ybht0oL7RU6SUi3Ev3imUNIH+VdA/Hkd+dk+f6d2Bhej6RK+8O3Nnqw== X-Received: by 10.50.111.169 with SMTP id ij9mr6816474igb.92.1454027124534; Thu, 28 Jan 2016 16:25:24 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102203 On Fri, Jan 29, 2016 at 11:01 AM, Fillmore wrote: > Does Python have Regexps? Yes! Although there are often other ways of doing things, so you don't *have* to use a regex for everything. But yes, Python has a powerful regular expression library. > How was the Python 2.7 vs Python 3.X solved? which version should I go for? Go for 3.x, unless you have a particular reason for using 2.7. There are heaps of cool new features in 3.x, and most of the modules you'll need support it. There's now very little reason for going 2.7 for new projects. > Do you think that switching to Python from Perl is a good idea at 45? Definitely. Never too old to learn new tricks. > Where do I get started moving from Perl to Python? Start with the Python tutorial in the docs; flip through that and get an idea of broadly how things work. Then port a simple script, so you know you can make Python do stuff for you. Get your code reviewed by experts (whether it works or not - you'll learn a lot from people saying "Hey, here's a different way you could do that"), and don't take anything personally. > which gotchas need I be aware of? Probably the biggest thing to take note of is the Python object model - how names and objects and assignment work. It's pretty straight-forward, but if it's not what you're used to, you'll need to get your head around it. Here's a good talk on the subject: http://nedbatchelder.com/text/names1.html > Thank you You're most welcome! And welcome to the list. This is a pretty friendly place; don't be afraid to post your code and ask for advice. All the best! ChrisA