doc_id
int32 0
2.25M
| text
stringlengths 101
8.13k
| source
stringlengths 38
44
|
|---|---|---|
2,200
|
Although the laws of motion and universal gravitation became Newton's best-known discoveries, he warned against using them to view the Universe as a mere machine, as if akin to a great clock. He said, "So then gravity may put the planets into motion, but without the Divine Power it could never put them into such a circulating motion, as they have about the sun".
|
https://en.wikipedia.org/wiki?curid=14627
|
2,201
|
Along with his scientific fame, Newton's studies of the Bible and of the early Church Fathers were also noteworthy. Newton wrote works on textual criticism, most notably "An Historical Account of Two Notable Corruptions of Scripture" and "". He placed the crucifixion of Jesus Christ at 3 April, AD 33, which agrees with one traditionally accepted date.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,202
|
He believed in a rationally immanent world, but he rejected the hylozoism implicit in Leibniz and Baruch Spinoza. The ordered and dynamically informed Universe could be understood, and must be understood, by an active reason. In his correspondence, Newton claimed that in writing the "Principia" "I had an eye upon such Principles as might work with considering men for the belief of a Deity". He saw evidence of design in the system of the world: "Such a wonderful uniformity in the planetary system must be allowed the effect of choice". But Newton insisted that divine intervention would eventually be required to reform the system, due to the slow growth of instabilities. For this, Leibniz lampooned him: "God Almighty wants to wind up his watch from time to time: otherwise it would cease to move. He had not, it seems, sufficient foresight to make it a perpetual motion."
|
https://en.wikipedia.org/wiki?curid=14627
|
2,203
|
Newton's position was vigorously defended by his follower Samuel Clarke in a famous correspondence. A century later, Pierre-Simon Laplace's work "Celestial Mechanics" had a natural explanation for why the planet orbits do not require periodic divine intervention. The contrast between Laplace's mechanistic worldview and Newton's one is the most strident considering the famous answer which the French scientist gave Napoleon, who had criticised him for the absence of the Creator in the "Mécanique céleste": "Sire, j'ai pu me passer de cette hypothèse" ("Sir, I didn't need this hypothesis").
|
https://en.wikipedia.org/wiki?curid=14627
|
2,204
|
Scholars long debated whether Newton disputed the doctrine of the Trinity. His first biographer, David Brewster, who compiled his manuscripts, interpreted Newton as questioning the veracity of some passages used to support the Trinity, but never denying the doctrine of the Trinity as such. In the twentieth century, encrypted manuscripts written by Newton and bought by John Maynard Keynes (among others) were deciphered and it became known that Newton did indeed reject Trinitarianism.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,205
|
Newton and Robert Boyle's approach to the mechanical philosophy was promoted by rationalist pamphleteers as a viable alternative to the pantheists and enthusiasts, and was accepted hesitantly by orthodox preachers as well as dissident preachers like the latitudinarians. The clarity and simplicity of science was seen as a way to combat the emotional and metaphysical superlatives of both superstitious enthusiasm and the threat of atheism, and at the same time, the second wave of English deists used Newton's discoveries to demonstrate the possibility of a "Natural Religion".
|
https://en.wikipedia.org/wiki?curid=14627
|
2,206
|
The attacks made against pre-Enlightenment "magical thinking", and the mystical elements of Christianity, were given their foundation with Boyle's mechanical conception of the universe. Newton gave Boyle's ideas their completion through mathematical proofs and, perhaps more importantly, was very successful in popularising them.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,207
|
In a manuscript he wrote in 1704 (never intended to be published), he mentions the date of 2060, but it is not given as a date for the end of days. It has been falsely reported as a prediction. The passage is clear when the date is read in context. He was against date setting for the end of days, concerned that this would put Christianity into disrepute.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,208
|
In the character of Morton Opperly in "Poor Superman" (1951), speculative fiction author Fritz Leiber says of Newton, "Everyone knows Newton as the great scientist. Few remember that he spent half his life muddling with alchemy, looking for the philosopher's stone. That was the pebble by the seashore he really wanted to find."
|
https://en.wikipedia.org/wiki?curid=14627
|
2,209
|
Of an estimated ten million words of writing in Newton's papers, about one million deal with alchemy. Many of Newton's writings on alchemy are copies of other manuscripts, with his own annotations. Alchemical texts mix artisanal knowledge with philosophical speculation, often hidden behind layers of wordplay, allegory, and imagery to protect craft secrets. Some of the content contained in Newton's papers could have been considered heretical by the church.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,210
|
In 1888, after spending sixteen years cataloguing Newton's papers, Cambridge University kept a small number and returned the rest to the Earl of Portsmouth. In 1936, a descendant offered the papers for sale at Sotheby's. The collection was broken up and sold for a total of about £9,000. John Maynard Keynes was one of about three dozen bidders who obtained part of the collection at auction. Keynes went on to reassemble an estimated half of Newton's collection of papers on alchemy before donating his collection to Cambridge University in 1946.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,211
|
All of Newton's known writings on alchemy are currently being put online in a project undertaken by Indiana University: "The Chymistry of Isaac Newton" and summarised in a book.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,212
|
Charles Coulston Gillispie disputes that Newton ever practised alchemy, saying that "his chemistry was in the spirit of Boyle's corpuscular philosophy."
|
https://en.wikipedia.org/wiki?curid=14627
|
2,213
|
In June 2020, two unpublished pages of Newton's notes on Jan Baptist van Helmont's book on plague, "De Peste", were being auctioned online by Bonhams. Newton's analysis of this book, which he made in Cambridge while protecting himself from London's 1665–1666 infection, is the most substantial written statement he is known to have made about the plague, according to Bonhams. As far as the therapy is concerned, Newton writes that "the best is a toad suspended by the legs in a chimney for three days, which at last vomited up earth with various insects in it, on to a dish of yellow wax, and shortly after died. Combining powdered toad with the excretions and serum made into lozenges and worn about the affected area drove away the contagion and drew out the poison".
|
https://en.wikipedia.org/wiki?curid=14627
|
2,214
|
The mathematician Joseph-Louis Lagrange said that Newton was the greatest genius who ever lived, and once added that Newton was also "the most fortunate, for we cannot find more than once a system of the world to establish." English poet Alexander Pope wrote the famous epitaph:
|
https://en.wikipedia.org/wiki?curid=14627
|
2,215
|
In a 2005 survey of members of Britain's Royal Society (formerly headed by Newton) asking who had the greater effect on the history of science, Newton or Albert Einstein, the members deemed Newton to have made the greater overall contribution. In 1999, an opinion poll of 100 of the day's leading physicists voted Einstein the "greatest physicist ever," with Newton the runner-up, while a parallel survey of rank-and-file physicists by the site PhysicsWeb gave the top spot to Newton. Einstein kept a picture of Newton on his study wall alongside ones of Michael Faraday and James Clerk Maxwell.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,216
|
Woolsthorpe Manor is a Grade I listed building by Historic England through being his birthplace and "where he discovered gravity and developed his theories regarding the refraction of light".
|
https://en.wikipedia.org/wiki?curid=14627
|
2,217
|
In 1816, a tooth said to have belonged to Newton was sold for £730 (3,633) in London to an aristocrat who had it set in a ring. "Guinness World Records 2002" classified it as the most valuable tooth, which would value approximately £25,000 (35,700) in late 2001. Who bought it and who currently has it has not been disclosed.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,218
|
Newton himself often told the story that he was inspired to formulate his theory of gravitation by watching the fall of an apple from a tree. The story is believed to have passed into popular knowledge after being related by Catherine Barton, Newton's niece, to Voltaire. Voltaire then wrote in his "Essay on Epic Poetry" (1727), "Sir Isaac Newton walking in his gardens, had the first thought of his system of gravitation, upon seeing an apple falling from a tree."
|
https://en.wikipedia.org/wiki?curid=14627
|
2,219
|
Although it has been said that the apple story is a myth and that he did not arrive at his theory of gravity at any single moment, acquaintances of Newton (such as William Stukeley, whose manuscript account of 1752 has been made available by the Royal Society) do in fact confirm the incident, though not the apocryphal version that the apple actually hit Newton's head. Stukeley recorded in his "Memoirs of Sir Isaac Newton's Life" a conversation with Newton in Kensington on 15 April 1726:
|
https://en.wikipedia.org/wiki?curid=14627
|
2,220
|
John Conduitt, Newton's assistant at the Royal Mint and husband of Newton's niece, also described the event when he wrote about Newton's life:
|
https://en.wikipedia.org/wiki?curid=14627
|
2,221
|
It is known from his notebooks that Newton was grappling in the late 1660s with the idea that terrestrial gravity extends, in an inverse-square proportion, to the Moon; however, it took him two decades to develop the full-fledged theory. The question was not whether gravity existed, but whether it extended so far from Earth that it could also be the force holding the Moon to its orbit. Newton showed that if the force decreased as the inverse square of the distance, one could indeed calculate the Moon's orbital period, and get good agreement. He guessed the same force was responsible for other orbital motions, and hence named it "universal gravitation".
|
https://en.wikipedia.org/wiki?curid=14627
|
2,222
|
Various trees are claimed to be "the" apple tree which Newton describes. The King's School, Grantham claims that the tree was purchased by the school, uprooted and transported to the headmaster's garden some years later. The staff of the (now) National Trust-owned Woolsthorpe Manor dispute this, and claim that a tree present in their gardens is the one described by Newton. A descendant of the original tree can be seen growing outside the main gate of Trinity College, Cambridge, below the room Newton lived in when he studied there. The National Fruit Collection at Brogdale in Kent can supply grafts from their tree, which appears identical to Flower of Kent, a coarse-fleshed cooking variety.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,223
|
Newton's monument (1731) can be seen in Westminster Abbey, at the north of the entrance to the choir against the choir screen, near his tomb. It was executed by the sculptor Michael Rysbrack (1694–1770) in white and grey marble with design by the architect William Kent. The monument features a figure of Newton reclining on top of a sarcophagus, his right elbow resting on several of his great books and his left hand pointing to a scroll with a mathematical design. Above him is a pyramid and a celestial globe showing the signs of the Zodiac and the path of the comet of 1680. A relief panel depicts putti using instruments such as a telescope and prism. The Latin inscription on the base translates as:
|
https://en.wikipedia.org/wiki?curid=14627
|
2,224
|
From 1978 until 1988, an image of Newton designed by Harry Ecclestone appeared on Series D £1 banknotes issued by the Bank of England (the last £1 notes to be issued by the Bank of England). Newton was shown on the reverse of the notes holding a book and accompanied by a telescope, a prism and a map of the Solar System.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,225
|
A statue of Isaac Newton, looking at an apple at his feet, can be seen at the Oxford University Museum of Natural History. A large bronze statue, "Newton, after William Blake", by Eduardo Paolozzi, dated 1995 and inspired by Blake's etching, dominates the piazza of the British Library in London. A bronze statue of Newton was erected in 1858 in the centre of Grantham where he went to school, prominently standing in front of Grantham Guildhall.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,226
|
The still-surviving farmhouse at Woolsthorpe By Colsterworth is a Grade I listed building by Historic England through being his birthplace and "where he discovered gravity and developed his theories regarding the refraction of light".
|
https://en.wikipedia.org/wiki?curid=14627
|
2,227
|
Enlightenment philosophers chose a short history of scientific predecessors—Galileo, Boyle, and Newton principally—as the guides and guarantors of their applications of the singular concept of nature and natural law to every physical and social field of the day. In this respect, the lessons of history and the social structures built upon it could be discarded.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,228
|
It is held by European philosophers of the Enlightenment and by historians of the Enlightenment that Newton's publication of the "Principia" was a turning point in the Scientific Revolution and started the Enlightenment. It was Newton's conception of the universe based upon natural and rationally understandable laws that became one of the seeds for Enlightenment ideology. Locke and Voltaire applied concepts of natural law to political systems advocating intrinsic rights; the physiocrats and Adam Smith applied natural conceptions of psychology and self-interest to economic systems; and sociologists criticised the current social order for trying to fit history into natural models of progress. Monboddo and Samuel Clarke resisted elements of Newton's work, but eventually rationalised it to conform with their strong religious views of nature.
|
https://en.wikipedia.org/wiki?curid=14627
|
2,229
|
Limonene is a colorless liquid aliphatic hydrocarbon classified as a cyclic monoterpene, and is the major component in the oil of citrus fruit peels. The -isomer, occurring more commonly in nature as the fragrance of oranges, is a flavoring agent in food manufacturing. It is also used in chemical synthesis as a precursor to carvone and as a renewables-based solvent in cleaning products. The less common -isomer has a piny, turpentine-like odor, and is found in the edible parts of such plants as caraway, dill, and bergamot orange plants.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,230
|
Limonene takes its name from Italian "limone" ("lemon"). Limonene is a chiral molecule, and biological sources produce one enantiomer: the principal industrial source, citrus fruit, contains -limonene ((+)-limonene), which is the ("R")-enantiomer. Racemic limonene is known as dipentene. -Limonene is obtained commercially from citrus fruits through two primary methods: centrifugal separation or steam distillation.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,231
|
Limonene is a relatively stable monoterpene and can be distilled without decomposition, although at elevated temperatures it cracks to form isoprene. It oxidizes easily in moist air to produce carveol, carvone, and limonene oxide. With sulfur, it undergoes dehydrogenation to "p"-cymene.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,232
|
Limonene occurs commonly as the ("R")-enantiomer, but racemizes to dipentene at 300 °C. When warmed with mineral acid, limonene isomerizes to the conjugated diene α-terpinene (which can also easily be converted to "p"-cymene). Evidence for this isomerization includes the formation of Diels–Alder adducts between α-terpinene adducts and maleic anhydride.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,233
|
It is possible to effect reaction at one of the double bonds selectively. Anhydrous hydrogen chloride reacts preferentially at the disubstituted alkene, whereas epoxidation with mCPBA occurs at the trisubstituted alkene.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,234
|
In another synthetic method Markovnikov addition of trifluoroacetic acid followed by hydrolysis of the acetate gives terpineol.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,235
|
In nature, limonene is formed from geranyl pyrophosphate, via cyclization of a neryl carbocation or its equivalent as shown. The final step involves loss of a proton from the cation to form the alkene.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,236
|
The most widely practiced conversion of limonene is to carvone. The three-step reaction begins with the regioselective addition of nitrosyl chloride across the trisubstituted double bond. This species is then converted to the oxime with a base, and the hydroxylamine is removed to give the ketone-containing carvone.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,237
|
-Limonene is a major component of the aromatic scents and resins characteristic of numerous coniferous and broadleaved trees: red and silver maple ("Acer rubrum", "Acer saccharinum"), cottonwoods ("Populus angustifolia"), aspens ("Populus grandidentata", "Populus tremuloides") sumac ("Rhus glabra"), spruce ("Picea" spp.), various pines (e.g., "Pinus echinata", "Pinus ponderosa"), Douglas fir ("Pseudotsuga menziesii"), larches ("Larix" spp.), true firs ("Abies" spp.), hemlocks ("Tsuga" spp.), cannabis ("Cannabis sativa" spp.), cedars ("Cedrus" spp.), various Cupressaceae, and juniper bush ("Juniperus" spp.). It contributes to the characteristic odor of orange peel, orange juice and other citrus fruits. To optimize recovery of valued components from citrus peel waste, d-limonene is typically removed.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,238
|
-Limonene applied to skin may cause irritation from contact dermatitis, but otherwise appears to be safe for human uses. Limonene is flammable as a liquid or vapor and it is toxic to aquatic life.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,239
|
Limonene is common as a dietary supplement and as a fragrance ingredient for cosmetics products. As the main fragrance of citrus peels, -limonene is used in food manufacturing and some medicines, such as a flavoring to mask the bitter taste of alkaloids, and as a fragrance in perfumery, aftershave lotions, bath products, and other personal care products. -Limonene is also used as a botanical insecticide. -Limonene is used in the organic herbicides. It is added to cleaning products, such as hand cleansers to give a lemon or orange fragrance (see orange oil) and for its ability to dissolve oils. In contrast, -limonene has a piny, turpentine-like odor.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,240
|
Limonene is used as a solvent for cleaning purposes, such as adhesive remover, or the removal of oil from machine parts, as it is produced from a renewable source (citrus essential oil, as a byproduct of orange juice manufacture). It is used as a paint stripper and is also useful as a fragrant alternative to turpentine. Limonene is also used as a solvent in some model airplane glues and as a constituent in some paints. Commercial air fresheners, with air propellants, containing limonene are used by stamp collectors to remove self-adhesive postage stamps from envelope paper.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,241
|
Limonene is also used as a solvent for fused filament fabrication based 3D printing. Printers can print the plastic of choice for the model, but erect supports and binders from High Impact Polystyrene (HIPS), a polystyrene plastic that is easily soluble in limonene.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,242
|
In preparing tissues for histology or histopathology, -limonene is often used as a less toxic substitute for xylene when clearing dehydrated specimens. Clearing agents are liquids miscible with alcohols (such as ethanol or isopropanol) and with melted paraffin wax, in which specimens are embedded to facilitate cutting of thin sections for microscopy.
|
https://en.wikipedia.org/wiki?curid=1779163
|
2,243
|
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,244
|
Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. It is often described as a "batteries included" language due to its comprehensive standard library.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,245
|
Guido van Rossum began working on Python in the late 1980s as a successor to the ABC programming language and first released it in 1991 as Python 0.9.0. Python 2.0 was released in 2000 and introduced new features such as list comprehensions, cycle-detecting garbage collection, reference counting, and Unicode support. Python 3.0, released in 2008, was a major revision that is not completely backward-compatible with earlier versions. Python 2 was discontinued with version 2.7.18 in 2020.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,246
|
Python was conceived in the late 1980s by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands as a successor to the ABC programming language, which was inspired by SETL, capable of exception handling (from the start plus new capabilities in Python 3.11) and interfacing with the Amoeba operating system. Its implementation began in December 1989. Van Rossum shouldered sole responsibility for the project, as the lead developer, until 12 July 2018, when he announced his "permanent vacation" from his responsibilities as Python's "benevolent dictator for life", a title the Python community bestowed upon him to reflect his long-term commitment as the project's chief decision-maker. In January 2019, active Python core developers elected a five-member Steering Council to lead the project.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,247
|
Python 2.0 was released on 16 October 2000, with many major new features. Python 3.0, released on 3 December 2008, with many of its major features backported to Python 2.6.x and 2.7.x. Releases of Python 3 include the codice_1 utility, which automates the translation of Python 2 code to Python 3.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,248
|
Python 2.7's end-of-life was initially set for 2015, then postponed to 2020 out of concern that a large body of existing code could not easily be forward-ported to Python 3. No further security patches or other improvements will be released for it. Currently only 3.7 and later are supported. In 2021, Python 3.9.2 and 3.8.8 were expedited as all versions of Python (including 2.7) had security issues leading to possible remote code execution and web cache poisoning.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,249
|
In 2022, Python 3.10.4 and 3.9.12 were expedited and 3.8.13, and 3.7.13, because of many security issues. When Python 3.9.13 was released in May 2022, it was announced that the 3.9 series (joining the older series 3.8 and 3.7) will only receive security fixes going forward. On September 7, 2022, four new releases were made due to a potential denial-of-service attack: 3.10.7, 3.9.14, 3.8.14, and 3.7.14.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,250
|
The deprecated codice_2 module has been removed from Python 3.12 (alpha). And a number of other old, broken and deprecated functions (e.g. from codice_3 module), classes and methods have been removed. The deprecated codice_4 and codice_5 length members of the C implementation of Unicode objects were removed, to make UTF-8 the default in later Python versions.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,251
|
Python is a multi-paradigm programming language. Object-oriented programming and structured programming are fully supported, and many of their features support functional programming and aspect-oriented programming (including metaprogramming and metaobjects). Many other paradigms are supported via extensions, including design by contract and logic programming.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,252
|
Python uses dynamic typing and a combination of reference counting and a cycle-detecting garbage collector for memory management. It uses dynamic name resolution (late binding), which binds method and variable names during program execution.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,253
|
Its design offers some support for functional programming in the Lisp tradition. It has functions; list comprehensions, dictionaries, sets, and generator expressions. The standard library has two modules ( and ) that implement functional tools borrowed from Haskell and Standard ML.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,254
|
Its core philosophy is summarized in the document "The Zen of Python" ("PEP 20"), which includes aphorisms such as:
|
https://en.wikipedia.org/wiki?curid=23862
|
2,255
|
Rather than building all of its functionality into its core, Python was designed to be highly extensible via modules. This compact modularity has made it particularly popular as a means of adding programmable interfaces to existing applications. Van Rossum's vision of a small core language with a large standard library and easily extensible interpreter stemmed from his frustrations with ABC, which espoused the opposite approach.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,256
|
Python strives for a simpler, less-cluttered syntax and grammar while giving developers a choice in their coding methodology. In contrast to Perl's "there is more than one way to do it" motto, Python embraces a "there should be one—and preferably only one—obvious way to do it" philosophy. Alex Martelli, a Fellow at the Python Software Foundation and Python book author, wrote: "To describe something as 'clever' is "not" considered a compliment in the Python culture."
|
https://en.wikipedia.org/wiki?curid=23862
|
2,257
|
Python's developers strive to avoid premature optimization and reject patches to non-critical parts of the CPython reference implementation that would offer marginal increases in speed at the cost of clarity. When speed is important, a Python programmer can move time-critical functions to extension modules written in languages such as C; or use PyPy, a just-in-time compiler. Cython is also available, which translates a Python script into C and makes direct C-level API calls into the Python interpreter.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,258
|
Python's developers aim for it to be fun to use. This is reflected in its name—a tribute to the British comedy group Monty Python—and in occasionally playful approaches to tutorials and reference materials, such as examples that refer to spam and eggs (a reference to a Monty Python sketch) instead of the standard foo, and bar.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,259
|
A common neologism in the Python community is "pythonic", which has a wide range of meanings related to program style. "Pythonic" code may use Python idioms well, be natural or show fluency in the language, or conform with Python's minimalist philosophy and emphasis on readability. Code that is difficult to understand or reads like a rough transcription from another programming language is called "unpythonic".
|
https://en.wikipedia.org/wiki?curid=23862
|
2,260
|
Python users and admirers, especially those considered knowledgeable or experienced, are often referred to as "Pythonistas".
|
https://en.wikipedia.org/wiki?curid=23862
|
2,261
|
Python is meant to be an easily readable language. Its formatting is visually uncluttered and often uses English keywords where other languages use punctuation. Unlike many other languages, it does not use curly brackets to delimit blocks, and semicolons after statements are allowed but rarely used. It has fewer syntactic exceptions and special cases than C or Pascal.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,262
|
Python uses whitespace indentation, rather than curly brackets or keywords, to delimit blocks. An increase in indentation comes after certain statements; a decrease in indentation signifies the end of the current block. Thus, the program's visual structure accurately represents its semantic structure. This feature is sometimes termed the off-side rule. Some other languages use indentation this way; but in most, indentation has no semantic meaning. The recommended indent size is four spaces.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,263
|
The assignment statement (codice_6) binds a name as a reference to a separate, dynamically-allocated object. Variables may subsequently be rebound at any time to any object. In Python, a variable name is a generic reference holder without a fixed data type; however, it always refers to "some" object with a type. This is called dynamic typing—in contrast to statically-typed languages, where each variable may contain only a value of a certain type.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,264
|
Python does not support tail call optimization or first-class continuations, and, according to Van Rossum, it never will. However, better support for coroutine-like functionality is provided by extending Python's generators. Before 2.5, generators were lazy iterators; data was passed unidirectionally out of the generator. From Python 2.5 on, it is possible to pass data back into a generator function; and from version 3.3, it can be passed through multiple stack levels.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,265
|
In Python, a distinction between expressions and statements is rigidly enforced, in contrast to languages such as Common Lisp, Scheme, or Ruby. This leads to duplicating some functionality. For example:
|
https://en.wikipedia.org/wiki?curid=23862
|
2,266
|
Statements cannot be a part of an expression—so list and other comprehensions or lambda expressions, all being expressions, cannot contain statements. A particular case is that an assignment statement such as cannot form part of the conditional expression of a conditional statement. This has the advantage of avoiding a classic C error of mistaking an assignment operator codice_6 for an equality operator codice_39 in conditions: is syntactically valid (but probably unintended) C code, but causes a syntax error in Python.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,267
|
Methods on objects are functions attached to the object's class; the syntax is, for normal methods and functions, syntactic sugar for . Python methods have an explicit codice_67 parameter to access instance data, in contrast to the implicit self (or codice_68) in some other object-oriented programming languages (e.g., C++, Java, Objective-C, Ruby). Python also provides methods, often called "dunder methods" (due to their names beginning and ending with double-underscores), to allow user-defined classes to modify how they are handled by native operations including length, comparison, in arithmetic operations and type conversion.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,268
|
Python uses duck typing and has typed objects but untyped variable names. Type constraints are not checked at compile time; rather, operations on an object may fail, signifying that it is not of a suitable type. Despite being dynamically typed, Python is strongly typed, forbidding operations that are not well-defined (for example, adding a number to a string) rather than silently attempting to make sense of them.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,269
|
Python allows programmers to define their own types using classes, most often used for object-oriented programming. New instances of classes are constructed by calling the class (for example, or ), and the classes are instances of the metaclass codice_69 (itself an instance of itself), allowing metaprogramming and reflection.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,270
|
Before version 3.0, Python had two kinds of classes (both using the same syntax): "old-style" and "new-style", current Python versions only support the semantics new style.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,271
|
The long-term plan is to support gradual typing. Python's syntax allows specifying static types, but they are not checked in the default implementation, CPython. An experimental optional static type-checker, "mypy", supports compile-time type checking.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,272
|
Python has the usual symbols for arithmetic operators (codice_29, codice_30, codice_31, codice_33), the floor division operator codice_32 and the modulo operation codice_49 (where the remainder can be negative, e.g. codice_76). It also has codice_34 for exponentiation, e.g. codice_78 and codice_79, and a matrix‑multiplication operator codice_37 . These operators work like in traditional math; with the same precedence rules, the operators infix (codice_29 and codice_30 can also be unary to represent positive and negative numbers respectively).
|
https://en.wikipedia.org/wiki?curid=23862
|
2,273
|
The division between integers produces floating-point results. The behavior of division has changed significantly over time:
|
https://en.wikipedia.org/wiki?curid=23862
|
2,274
|
In Python terms, codice_33 is "true division" (or simply "division"), and codice_32 is "floor division." codice_33 before version 3.0 is "classic division".
|
https://en.wikipedia.org/wiki?curid=23862
|
2,275
|
Rounding towards negative infinity, though different from most languages, adds consistency. For instance, it means that the equation is always true. It also means that the equation is valid for both positive and negative values of codice_92. However, maintaining the validity of this equation means that while the result of codice_93 is, as expected, in the half-open interval [0, "b"), where codice_94 is a positive integer, it has to lie in the interval ("b", 0] when codice_94 is negative.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,276
|
Python provides a codice_96 function for rounding a float to the nearest integer. For tie-breaking, Python 3 uses round to even: codice_97 and codice_98 both produce codice_99. Versions before 3 used round-away-from-zero: codice_100 is codice_101, codice_102 is codice_103.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,277
|
Python allows boolean expressions with multiple equality relations in a manner that is consistent with general use in mathematics. For example, the expression codice_104 tests whether codice_92 is less than codice_94 and codice_94 is less than codice_108. C-derived languages interpret this expression differently: in C, the expression would first evaluate codice_109, resulting in 0 or 1, and that result would then be compared with codice_108.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,278
|
Python uses arbitrary-precision arithmetic for all integer operations. The codice_111 type/class in the codice_112 module provides decimal floating-point numbers to a pre-defined arbitrary precision and several rounding modes. The codice_113 class in the codice_114 module provides arbitrary precision for rational numbers.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,279
|
Due to Python's extensive mathematics library, and the third-party library NumPy that further extends the native capabilities, it is frequently used as a scientific scripting language to aid in problems such as numerical data processing and manipulation.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,280
|
Python's large standard library provides tools suited to many tasks and is commonly cited as one of its greatest strengths. For Internet-facing applications, many standard formats and protocols such as MIME and HTTP are supported. It includes modules for creating graphical user interfaces, connecting to relational databases, generating pseudorandom numbers, arithmetic with arbitrary-precision decimals, manipulating regular expressions, and unit testing.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,281
|
Some parts of the standard library are covered by specifications—for example, the Web Server Gateway Interface (WSGI) implementation codice_115 follows PEP 333—but most are specified by their code, internal documentation, and test suites. However, because most of the standard library is cross-platform Python code, only a few modules need altering or rewriting for variant implementations.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,282
|
Most Python implementations (including CPython) include a read–eval–print loop (REPL), permitting them to function as a command line interpreter for which users enter statements sequentially and receive results immediately.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,283
|
Python also comes with an Integrated development environment (IDE) called IDLE, which is more beginner-oriented.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,284
|
Other shells, including IDLE and IPython, add further abilities such as improved auto-completion, session state retention, and syntax highlighting.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,285
|
As well as standard desktop integrated development environments, there are Web browser-based IDEs, including SageMath, for developing science- and math-related programs; PythonAnywhere, a browser-based IDE and hosting environment; and Canopy IDE, a commercial IDE emphasizing scientific computing.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,286
|
CPython is the reference implementation of Python. It is written in C, meeting the C89 standard (Python 3.11 uses C11) with several select C99 features (With later C versions out, it is considered outdated. CPython includes its own C extensions, but third-party extensions are not limited to older C versions—e.g. they can be implemented with C11 or C++.) It compiles Python programs into an intermediate bytecode which is then executed by its virtual machine. CPython is distributed with a large standard library written in a mixture of C and native Python, and is available for many platforms, including Windows (starting with Python 3.9, the Python installer deliberately fails to install on Windows 7 and 8; Windows XP was supported until Python 3.5) and most modern Unix-like systems, including macOS (and Apple M1 Macs, since Python 3.9.1, with experimental installer) and unofficial support for e.g. VMS. Platform portability was one of its earliest priorities. (During Python 1 and 2 development, even OS/2 and Solaris were supported, but support has since been dropped for many platforms.)
|
https://en.wikipedia.org/wiki?curid=23862
|
2,287
|
There are several compilers to high-level object languages, with either unrestricted Python, a restricted subset of Python, or a language similar to Python as the source language:
|
https://en.wikipedia.org/wiki?curid=23862
|
2,288
|
Performance comparison of various Python implementations on a non-numerical (combinatorial) workload was presented at EuroSciPy '13. Python's performance compared to other programming languages is also benchmarked by The Computer Language Benchmarks Game.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,289
|
Python's development is conducted largely through the "Python Enhancement Proposal" (PEP) process, the primary mechanism for proposing major new features, collecting community input on issues, and documenting Python design decisions. Python coding style is covered in PEP 8. Outstanding PEPs are reviewed and commented on by the Python community and the steering council.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,290
|
Enhancement of the language corresponds with the development of the CPython reference implementation. The mailing list python-dev is the primary forum for the language's development. Specific issues were originally discussed in the Roundup bug tracker hosted at by the foundation. In 2022, all issues and discussions were migrated to GitHub. Development originally took place on a self-hosted source-code repository running Mercurial, until Python moved to GitHub in January 2017.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,291
|
CPython's public releases come in three types, distinguished by which part of the version number is incremented:
|
https://en.wikipedia.org/wiki?curid=23862
|
2,292
|
Many alpha, beta, and release-candidates are also released as previews and for testing before final releases. Although there is a rough schedule for each release, they are often delayed if the code is not ready. Python's development team monitors the state of the code by running the large unit test suite during development.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,293
|
The major academic conference on Python is PyCon. There are also special Python mentoring programs, such as Pyladies.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,294
|
Python 3.10 deprecated codice_4 (to be removed in Python 3.12; meaning Python extensions need to be modified by then), and added pattern matching to the language.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,295
|
Tools that can generate documentation for Python API include pydoc (available as part of the standard library), Sphinx, Pdoc and its forks, Doxygen and Graphviz, among others.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,296
|
Python's name is derived from the British comedy group Monty Python, whom Python creator Guido van Rossum enjoyed while developing the language. Monty Python references appear frequently in Python code and culture; for example, the metasyntactic variables often used in Python literature are "spam" and "eggs" instead of the traditional "foo" and "bar". The official Python documentation also contains various references to Monty Python routines.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,297
|
The prefix "Py-" is used to show that something is related to Python. Examples of the use of this prefix in names of Python applications or libraries include Pygame, a binding of SDL to Python (commonly used to create games); PyQt and PyGTK, which bind Qt and GTK to Python respectively; and PyPy, a Python implementation originally written in Python.
|
https://en.wikipedia.org/wiki?curid=23862
|
2,298
|
Since 2003, Python has consistently ranked in the top ten most popular programming languages in the TIOBE Programming Community Index where, , it is the most popular language (ahead of Java, and C). It was selected Programming Language of the Year (for "the highest rise in ratings in a year") in 2007, 2010, 2018, and 2020 (the only language to do so four times).
|
https://en.wikipedia.org/wiki?curid=23862
|
2,299
|
An empirical study found that scripting languages, such as Python, are more productive than conventional languages, such as C and Java, for programming problems involving string manipulation and search in a dictionary, and determined that memory consumption was often "better than Java and not much worse than C or C++".
|
https://en.wikipedia.org/wiki?curid=23862
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.