News for hackers. Stuff that matters.
Re:Why Python keeps growing, explained by milliams on Friday March 03, 2023 @08:11AM (#35009097)
This was already posted at https://news.ycombinator.com/item?id=35000415, I don't know why it didn't detect the duplicate. I'll repost my comment from there:

This is a strange article. It's got the talking point about Python that we were hearing about 10 years ago - "tired of those pesky curly brackets in Java, try this new language you might not have heard of: Python!". Who reading the GitHub blog has not heard of Python?

Also, that snippet used in the "What is Python commonly used for" section is strange:

  import antigravity
  
  def main():
      antigravity.fly()

  if __name__ == '__main__':
      main()
It's overly verbosely written (especially given the example just above about how you don't need main function in Python) and refers just to an insider joke/Easter egg. I can't see that it's going to convince anyone to try Python, only make them feel that they're on the outside of a joke.

It then ends with what seems like it might have been the point of the article, an advert for Copilot. It seems the way to get started writing Python is to write a short comment and then spam <TAB> and let the AI auto-complete your project.

(Also, and perhaps less importantly, looking at the author's GitHub profile I can't see a single instance of Python there. Though I'm not doing a deep-dive as that feel overly picky and there's plenty of private contributions that could well be Python.)

Re:Why Python keeps growing, explained by Jevon23 on Friday March 03, 2023 @08:15AM (#35009146)
>It's got the talking point about Python that we were hearing about 10 years ago - "tired of those pesky curly brackets in Java, try this new language you might not have heard of: Python!"

That was a talking point closer to 20 years ago, at this point.

Re:Why Python keeps growing, explained by milliams on Friday March 03, 2023 @08:16AM (#35009160)
You're right, I think I was caught out by the unending march of time :)
Re:Why Python keeps growing, explained by DoctorOW on Friday March 03, 2023 @09:18AM (#35009917)
There's a joke I saw that goes like:

   1980-2000 = "30 years ago"
   2000-2010 = "10 years ago"
   2010-2023 = "Recently
Re:Why Python keeps growing, explained by Yoric on Friday March 03, 2023 @10:05AM (#35010516)
Pretty sure I tried both Java and Python at the end of the 90s. So more 25 years ago.
Re:Why Python keeps growing, explained by jherskovic on Friday March 03, 2023 @08:21AM (#35009212)
The antigravity part is probably a reference to https://xkcd.com/353/
Re:Why Python keeps growing, explained by wodenokoto on Friday March 03, 2023 @09:17AM (#35009901)
It _is_ a reference to https://xkcd.com/353/, quite literally, as importing the module opens that link.
Re:Why Python keeps growing, explained by gary_0 on Friday March 03, 2023 @11:39AM (#35011830)
> Hello world is just `print "Hello, world!"`

SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Hello, world!")?

Re:Why Python keeps growing, explained by pxc on Friday March 03, 2023 @02:04PM (#35013665)
That's because that issue of the webcomic is like 15 years old. It was true of the version of Python which was current at the time:

https://stackoverflow.com/questions/6182964/why-is-parenthes...

Re:Why Python keeps growing, explained by gary_0 on Friday March 03, 2023 @02:34PM (#35013994)
Yes, I know. But some people still have the reflex from Python 2 and feel bitter when the error message says "I know what you want, and I'm not giving it to you."
Re:Why Python keeps growing, explained by bityard on Friday March 03, 2023 @08:56AM (#35009672)
Agree, I thought it was a pretty low-effort article until I got to the end and realized it was just an ad for CodeSpaces and CoPilot.
Re:Why Python keeps growing, explained by wepzen on Tuesday March 07, 2023 @08:36AM (#35055147)
I find CoPilot to be super useful, but I would not use CodeSpaces due to safety concerns and limitations in team management.
Re:Why Python keeps growing, explained by wodenokoto on Friday March 03, 2023 @09:20AM (#35009937)
It's doubly weird, since the antigravity module doesn't have a fly attribute, and it "does its thing" on import.

https://github.com/python/cpython/blob/main/Lib/antigravity....

Re:Why Python keeps growing, explained by jerpint on Saturday March 04, 2023 @06:23PM (#35025532)
Very suspect
Re:Why Python keeps growing, explained by FlyingSnake on Friday March 03, 2023 @09:21AM (#35009953)
I read the article and had the same feeling that it's a fluff piece without substance. If you've to compare anything, compare it with the vibrant JVM ecosystem. Using the same tired argument of `System.but.Println()` shows the author has no original idea. Python is great but JVM is no lackey, it is a marvelous piece of battle tested engineering.

In the end it is just an ad for Github products and not worthy of being on HN frontpage.

Re:Why Python keeps growing, explained by Kwpolska on Friday March 03, 2023 @12:10PM (#35012316)
> Who reading the GitHub blog has not heard of Python?

The GitHub blog became a strange place recently(-ish). It went from a factual blog describing fancy new GitHub features and interesting technical stuff (as it was a decade ago) to mostly a place full of incoherent marketing fluff like this post (with some real technical content interspersed).

Re:Why Python keeps growing, explained by m3047 on Friday March 03, 2023 @12:41PM (#35012733)
But I didn't type

  import antigravity
I typed

  pydoc3 antigravity
(Cue clip of industrial disaster in background.)
Re:Why Python keeps growing, explained by dpedu on Friday March 03, 2023 @12:46PM (#35012791)
Curly brackets or brackets at all aren't mentioned by name in the article - is that your interpretation of the first code example?

IMO, that example is there to show that there's less required boilerplate required in python compared to java when doing the same thing. And, in particular, none of that boilerplate really matters to what you want to do - print hello world - emphasizing the point of python being simple.

Re:Why Python keeps growing, explained by jerpint on Saturday March 04, 2023 @06:21PM (#35025527)
The section that explains why python is good for AI talks about pybrain, a library that seems to date from 10 years ago. I’m pretty well versed in most ml frameworks and never heard of it. Last update to the website looks to be 2010. Weird to feature that and PyTorch as examples of ML libraries. No mention of sklearn which is vastly more popular