1. Python Software Foundation. (2023). urllib.parse — Parse URLs into components. Python 3.12.0 documentation. Retrieved from https://docs.python.org/3/library/urllib.parse.html.
Reference Details: In the "URL parsing" section, the documentation describes the netloc component, which is parsed into hostname and port, confirming the structure seen in the question.
2. Internet Engineering Task Force (IETF). (2005). RFC 3986: Uniform Resource Identifier (URI): Generic Syntax.
Reference Details: Section 3.2.2 ("Host") and Section 3.2.3 ("Port") define the syntax. Section 3.2.3 states, "The port subcomponent...is designated by an optional port number in decimal following the host and delimited from it by a single colon (":") character."
3. Internet Engineering Task Force (IETF). (2013). RFC 6761: Special-Use Domain Names.
Reference Details: Section 6.3 ("localhost.") specifies that the name "localhost" must resolve to the IPv4 loopback address 127.0.0.1 or the IPv6 loopback address ::1, confirming it refers to the local machine.
4. Massachusetts Institute of Technology (MIT) OpenCourseWare. (2016). 6.033 Computer System Engineering, Spring 2009. Lecture Notes, Recitation 10: Networking I.
Reference Details: The notes explain that a network connection requires an IP address and a port number, where the IP address identifies the machine and the port number identifies the specific application on that machine. The concept of localhost as 127.0.0.1 is a fundamental networking principle covered.