Jump to content

Outdated Python...

DarshanDash

Hello everyone,

                         Here's the thing the other day i started watching TheNewBoston which was suggested by one of the  members here about Python i'm at lesson 7-8 right now at sequences and lists(Haven't got to that yet) Im done with expressions , inputs , strings but i feel shaky with it cause i have some issue with memorizing the commands (Why i suck at math).The weird thing i found out was some of bucky's videos were outdated according to the comments in his videos like raw_input doesnt exist anymore in python 3.x.x. so i'm lost right now should i continue learning or find an alternative method? I also kinda still confused with the idea with what you can do with coding cause there's so much i wanna know like Java,HTML, kotlin and more.Any professional programmer could give me a helping here?

thanks..

Link to comment
Share on other sites

Link to post
Share on other sites

Raw input was replaced with input. Input assumes that the input is a string and makes it a string.

 

If you need input to be something else you need to convert it. 

 


#a string

Name = input ('enter name')

MyInt= int(input('enter int'))

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

So whats the fuss about it being outdated? Cause in worried if i might be learning old stuff instead of catching up with the latest trend

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, DarshanDash said:

So whats the fuss about it being outdated? Cause in worried if i might be learning old stuff instead of catching up with the latest trend

Well 2.7 is no longer being developed, people for a number of reasons cling to 2.7 be it from "I hate that print is a function" to code compatibility of the system the code runs one. 

 

If you're just starting to learn just learn python 3. For the most part the only thing you'll notice is what I posted above and some modules were renamed in py3.

 

Python 3 has some nice features such as generators. 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

Waaat im on python 2 the basic ones i learnt half way so much i cant just literally stop everything now....

Also i started learning html5 since i felt like its a bit easier is it a good move lol?

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, vorticalbox said:

Well 2.7 is no longer being developed, people for a number of reasons cling to 2.7 be it from "I hate that print is a function" to code compatibility of the system the code runs one.

Python 2.7 is still in active support, the last release was in September, and is slated to be supported until 2020.

 

However I'd argue that it was a dumb idea to make a new version and change a good chunk of keywords and built-ins such that it breaks compatibility with existing software.

Link to comment
Share on other sites

Link to post
Share on other sites

51 minutes ago, M.Yurizaki said:

Python 2.7 is still in active support, the last release was in September, and is slated to be supported until 2020.

 

However I'd argue that it was a dumb idea to make a new version and change a good chunk of keywords and built-ins such that it breaks compatibility with existing software.

was having this exact conversation today. Weird that. 

 

But yeah, I guess they just wanted it in a new way. 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, DarshanDash said:

Waaat im on python 2 the basic ones i learnt half way so much i cant just literally stop everything now....

Also i started learning html5 since i felt like its a bit easier is it a good move lol?

Then finish up then port your code to python. It's a good exercise 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, M.Yurizaki said:

Python 2.7 is still in active support, the last release was in September, and is slated to be supported until 2020.

 

However I'd argue that it was a dumb idea to make a new version and change a good chunk of keywords and built-ins such that it breaks compatibility with existing software.

If they'd keep all the old syntax then it would become a massive mess (like C++).

And they even provide with some software to automate the conversion:

https://docs.python.org/2/library/2to3.html

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

To the OP, continue learning Python 2. Most of it transfers to 3 if you decide you need to learn and use that later.

 

The transition from Python 2 to 3 is a mess. Especially if you use different software dependent on a particular version. But I guess that's what package managers like anaconda/miniconda are for. You can create environments for your Python 2 software and another for 3 and switch as needed. I do work in science and the transition to 3 is still ongoing.

Link to comment
Share on other sites

Link to post
Share on other sites

On 05/12/2017 at 3:31 PM, DarshanDash said:

So whats the fuss about it being outdated? Cause in worried if i might be learning old stuff instead of catching up with the latest trend

One should always use the most current version of something unless there's a very good reason not to such as legacy support for example.

23 hours ago, ono said:

To the OP, continue learning Python 2.

Sorry but that's terrible advice O.o

23 hours ago, ono said:

You can create environments

Indeed, these are invaluable for dependency management, you should have a look here.

On 05/12/2017 at 12:25 PM, DarshanDash said:

Any professional programmer could give me a helping here?

What are you hoping to get out of this, where do you most want to end up and what really drives you?

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Nuluvius said:

Sorry but that's terrible advice O.o

I'm interested in the rationale behind this. I have continued use of Python 2.7 because a few modules are not supported with 3.

Join the Appleitionist cause! See spoiler below for answers to common questions that shouldn't be common!

Spoiler

Q: Do I have a virus?!
A: If you didn't click a sketchy email, haven't left your computer physically open to attack, haven't downloaded anything sketchy/free, know that your software hasn't been exploited in a new hack, then the answer is: probably not.

 

Q: What email/VPN should I use?
A: Proton mail and VPN are the best for email and VPNs respectively. (They're free in a good way)

 

Q: How can I stay anonymous on the (deep/dark) webzz???....

A: By learning how to de-anonymize everyone else; if you can do that, then you know what to do for yourself.

 

Q: What Linux distro is best for x y z?

A: Lubuntu for things with little processing power, Ubuntu for normal PCs, and if you need to do anything else then it's best if you do the research yourself.

 

Q: Why is my Linux giving me x y z error?

A: Have you not googled it? Are you sure StackOverflow doesn't have an answer? Does the error tell you what's wrong? If the answer is no to all of those, message me.

 

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, LtStaffel said:

I'm interested in the rationale behind this.

Because you owe it to yourself if you actually care about what you're doing to keep current - always update when possible and feasible to do so.

14 hours ago, LtStaffel said:

I have continued use of Python 2.7 because a few modules are not supported with 3.

Of course you have to be pragmatic, if there's something that's really needed then you have no choice...

15 hours ago, Nuluvius said:

One should always use the most current version of something unless there's a very good reason not to

But I'd be inclined to investigate every possible alternative first.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

gonna finish up html5 then python  hopefully i get somewhere thanks for heads up everyone! 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×